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

Looping through multiple table result set

Status
Not open for further replies.

syukna

MIS
Apr 14, 2006
49
DE
Hi,

I have a stored procedure that gets data to populate a grid. Due to new business logic I need to now look at all of the data for each row in the grid. Each row item has about 20 tables associated with it. I'm wondering if there is a way to essentially loop through a dataset but using a stored procedure instead.

Something similar to this is what I would be doing.
Code:
//get the data for the grid.
Select myID, myName from Table1

//now I would exec a stored procedure to get each individual items info
exec spGetAllMyInfo myID

//I would then need to loop through every table in that result set to see if a field contains a specific word
Maybe there is a better way to do this, but any help is greatly appreciated.
 
No, I wasn't offended at all.

In any case I do have a mistake in that query. Change the last o_OccasionID to f.OccasionID.
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top