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 wOOdy-Soft on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

Wrapping 2 stored procedures into a select statement

Status
Not open for further replies.

SteveMe

MIS
Aug 30, 2002
83
US
Exec checkk 'enrgy80'
Exec checkk 'enrgy46'


I need the records from this stored procedure into one dataset via a select statement
 
How do you want to call the SP, in QA, or from a front end app?

Jim
 
You should create a temp table that has the same structure as the data returned from the stored procedure, then Insert exec from the stored procedure.

Create Table #Temp(Field1 DataType1, Field2 DataType2)

Insert Into #Temp Exec Checkk 'enrgy80'
Insert Into #Temp Exec Checkk 'enrgy46'

Select * from #Temp

The syntax may not be perfect, but the process is the way to go. Check Books on line for more information.



-George

Strong and bitter words indicate a weak cause. - Fortune cookie wisdom
 
gmmastros I get an error when trying that

Server: Msg 8164, Level 16, State 1, Procedure Checkk , Line 29
An INSERT EXEC statement cannot be nested.

(0 row(s) affected)
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top