0

I have a select statement that obviously pulls some results from my database. Once I get those results, I would like to access them one at a time for another Select statement, is that possible? I am doing this in a user defined function.

Example:

SELECT differentKindsOfBread FROM breadDrawer
WHERE differentKindsOfBread IS NOT Null

Now I want to use my results to do another Select like:

SELECT differentKindsOfBread[1] FROM differentKindsOfBread
WHERE blah = blahblah    

EDIT Lets say differentKindsOfBread selected:

 Rye
 White
 Wheat
 half-Wheat

Now I want to do selects for each one like:

Select Rye (differntKindsOfBread[0]) ...
Select White (differntKindsOfBread[1]) ...

Thanks,

eanderson
  • 118
  • 1
  • 5
  • 16

0 Answers0