Hi all. I just want to know what the best way to have a stored procedure check if the next X number of records exist. Let's say 15...I have a stored proc, but I need to add some logic to it to return me 1 if there are more records, or a 0 if there are not for example.
Perhaps it is easier if I add a count to the number of records that exist given the arguments that are already going into my stored proc?
What would be the best way to go about this?
The next X records from where? If you mean from a cursor you already have open, then no: even Oracle doesn't know whether there are any more records until you fetch them. So your only option would be to actually (try to) fetch X more records, and then presumably keep the data in an array (collection) so that you can use it.