On 28 Jun 2004 06:44:05 -0700, Andrew Young wrote:
How do I loop thru a result set Without using a curosr?
Hi Andrew,
Mischa already gave some suggestions. I'd have put number three first (and
repeated it several times).
Seriously: why do you want to loop through a result set? Can you describe
the business need you're trying to solve? Set-based solutions tend to be
better and quicker and most problems CAN be solved with set-based SQL.
On the other hand, if you really must (or want to) loop through a result
set, why not use a cursor? That's SQL's standard instrument for looping
through a result set. Of course, you can find other ways to do the same,
but they'll probably be less efficient than a cursor (which is already
very inefficient!)
Best, Hugo
--
(Remove _NO_ and _SPAM_ to get my e-mail address)