Adu
Adu

Reputation: 381

Call sp within another sp

I have an sp named 'FolderSttructure'.It returns the following result -

FolderID

1 2 3 4

I have to call the above sp 'FolderSttructure' inside another sp named 'SearchFolder' and insert the result of first sp in to a temperory table.

Is it possible?

If yes how can we do that?

Upvotes: 0

Views: 173

Answers (1)

AdaTheDev
AdaTheDev

Reputation: 147304

Yse, you can do it like this:

CREATE TABLE #ATempTable
(
FolderID INTEGER
)

INSERT #ATempTable
EXECUTE FolderSttructure
...

Upvotes: 3

Related Questions