Selecting individual rows from a query inside a stored procedure
I am trying to make a stored procedure that requires me to go through each row of a table using a while loop.
How can I do this?
I tried to use a counter starting at 0, and then using LIMIT counter, 1 - but that doesn't work (LIMIT doesn't accept variables). There is a feature request to enable that, though.
Context: I have a database that models tracks, cds, and the like. The stored procedure is supposed to see how many consecutive tracks starting at track 1 can fit in 10 minutes. I *have* to implement this using a loop (mandated by my professor). She suggested just using a WHERE clause since I know what the track numbers are going to be and counting up. That works, but I was just wondering if there was a more general solution.
Thanks for any insight.
Subject
Views
Written By
Posted
Selecting individual rows from a query inside a stored procedure
2215
November 14, 2005 02:13PM
1513
November 15, 2005 03:16PM
Sorry, you can't reply to this topic. It has been closed.
Content reproduced on this site is the property of the respective copyright holders.
It is not reviewed in advance by Oracle and does not necessarily represent the opinion
of Oracle or any other party.