Subject Re: question: stored proc and FOR SELECT...DO
Author frische_brise2003
Hi, Helen.

> "Normal" behaviour is for execution to go where your logic takes it.
That's a fine defiition. I will keep this in mind ;-)

> if (exists (select 1 from.....where (xyz))) then
> begin
> for select blah, blah, etc.
[SNIP]

So you use the exists() function to check if there
are matching records.
Wouldn't it be better if the loop would simply not
process the body if there are no matching records
(like it is in any programming language; of course,
there the condition is not a SELECT statement)?

Or did I miss something??

Regards

Jürgen