Please start any new threads on our new site at https://forums.sqlteam.com. We've got lots of great SQL Server experts to answer whatever question you can come up with.

 All Forums
 SQL Server 2000 Forums
 Transact-SQL (2000)
 combining multiple Recordsets

Author  Topic 

drman
Starting Member

38 Posts

Posted - 2006-06-27 : 13:41:26
We are trying to design an ASP page that will have functionality that is similar to what you would see on one of the big shipping companies sites. They allow for a user to enter as many tracking numbers as required and then submit the numbers and show all of the cooresponding data for each of the tracking numbers. My line of business is different, but the functionality of returning the results of numerous ids is similar.

The thought was to load the query items into an array and loop through the stored procedure (1 for each item) until all of the recordsets are created. Then post the results to the asp page. Is trying to combine multiple recordsets a poor way to do this? if it is a poor way...suggestions, if it is not a poor way...please get me past the concept.

I am not sure of the correct approach to handling this, but I have always received great help from this site.....

Thanks in advance.

Drman

TG
Master Smack Fu Yak Hacker

6065 Posts

Posted - 2006-06-27 : 14:40:15
One way:
Create an SP that takes a delimited string of IDs as an input parameter. Then in the SP, use a parsing routine to load the IDs into a table variable. Join your table variable by ID to your select statement. Do a search on this site for "parsing" or "csv" for ideas how to parse the string.

Be One with the Optimizer
TG
Go to Top of Page

madhivanan
Premature Yak Congratulator

22864 Posts

Posted - 2006-06-28 : 02:34:15
Search for Where in @MYCSV here
http://sqlteam.com/forums/topic.asp?TOPIC_ID=55210

Madhivanan

Failing to plan is Planning to fail
Go to Top of Page
   

- Advertisement -