hi there; my actual query is much more involved than this, so i'm going to first break it down into a very simple example. from there, if i'm still having issues, then i'll post the whole thing :)
what i'd like to do is, in my stored procedure, write a query that will produce a list of ID's. then, in the same procedure, i would like to feed each of those ID's into a seperate query and have those results returned (i.e. binded) to my datagrid on my .aspx page.
for example: lets say i have
SELECT fldListingID FROM tblListing WHERE fldPrice > @price
this will result in, say, 15 fldListingID's.
then, i want to do a new query based on each fldListingID returned from the first query.
SELECT fldPhotoID FROM tblPhoto WHERE fldListingID = <the listing ID's from the first query>
i think that's pretty self explanatory and fairly straightforward to do. i'm just not sure of the correct syntax.
again, this is just a simple example, but i think if i'm shown how, i can apply it to my own procedure.