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

SELECT values, then the next, then the next, etc

Status
Not open for further replies.

TomBarrand

Programmer
Aug 9, 2000
162
GB
I have the following SQL statment. If it returns say 5 values I want to do something with the first value, get the next value, then the next, etc until I get to the last value. Is this possible? Is there some sort of MoveNext function.

Select FOB_No FROM FOB WHERE Purch_Ord_Line_No = 10
 
Are you using this in programming code or as stand alone SQL?
 
Ideally in standalone SQL, if this is not possible I will have to use a VBScript I think. SQL is the preferred option though.

Thanks for your help
 
I think Cursors may help u. @@FETCH_STATUS parameter helps u to find end of file.
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top