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

sp AND temp table

Status
Not open for further replies.

vlitim

Programmer
Sep 2, 2000
393
GB
I have a sp that is called from an asp page and generates a temp table and then outputs the result to a page.

What I need to do is get the results from the first stored procedure and then run another stored procedure based on the first ones temp table results. Now I can do this but I want the first sp to act as a sort of template as it will get called in multiple places as the beginning of a query but then different variables need to be passed to the second sp depending on what the search is!

I know I could pass all the variables to the first one and then call the second one dependin on the vars. But If a new search page is required and more variables for the second sp I don't want to have to go through all the previous asp calls to the sp and add all the new vars to it??

I don't know if that made any sense, but any ideas if it did would be very helpful!

Cheers
Tim
 
IF you are using SQL 2000, you can try to convert your stored procedure to a function which will output the results as table. You can then use this output in a following stored procedure.
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top