Subject | Re: question: stored proc and FOR SELECT...DO |
---|---|
Author | frische_brise2003 |
Post date | 2004-06-24T12:51:10Z |
Hi, Helen.
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
> "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[SNIP]
> begin
> for select blah, blah, etc.
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