Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations Chris Miller on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

Virtual table?

Status
Not open for further replies.

jararaca

Programmer
Jun 1, 2005
159
US
Is there a way to create a virtual table in a stored procedure that holds the results of a call to another stored procedure?

In other words, say I have sp1. Can I do something like this in sp2:

VirtualTable = EXEC(sp1 param1, param2)

SELECT<field list>
FROM VirtualTable

If so, what is the correct way to do it?

Thanks,
 
You can use Insert <table> exec sp(param1, .. etc)

But you first must create the virtual table definition first.

Jim
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top