|
Posted by Ed Murphy on 11/30/06 20:04
Douglas wrote:
> I guess the key question for me is, can this be done */entirely/* in SQL?
>
> importantly, is the SQL WHILE loop suitable ? using a while command
> *seems* to me to be used for executing a "*/whole/*" query as part of a
> logic branch, not "keep picking out records while condition = true/false"
Any of the previously cited examples (all of which are done entirely in
SQL) ought to be adaptable. The WHILE loop allows you to iterate over a
cursor, which lets you go through a table one row at a time. (You do
have to break out of the loop if you run out of rows.)
Navigation:
[Reply to this message]
|