I am trying to call a stored procedure from within another sproc and insert the results into a temp table in the calling program.
Using SQL 2000
Ex: USP_TEST has a temp table that will hold the results from USP_TEST2.
I call USP_TEST2 using EXEC USP_TEST2 @date, passing a date parameter. When I run in query analyser I get the results but no sure how to put them into the temp table in USP_TEST.
Have tried INSERT INTO TEMP_TABLE
(ID, NAME, CHQ_AMT, BILL_AMT)
VALUES
(but this is where I need help, how do I get the values form USP_TEST2 into variables or something so I can put into TEMP_TABLE)
Thanks
Using SQL 2000
Ex: USP_TEST has a temp table that will hold the results from USP_TEST2.
I call USP_TEST2 using EXEC USP_TEST2 @date, passing a date parameter. When I run in query analyser I get the results but no sure how to put them into the temp table in USP_TEST.
Have tried INSERT INTO TEMP_TABLE
(ID, NAME, CHQ_AMT, BILL_AMT)
VALUES
(but this is where I need help, how do I get the values form USP_TEST2 into variables or something so I can put into TEMP_TABLE)
Thanks