Subject | question: stored proc and FOR SELECT...DO |
---|---|
Author | frische_brise2003 |
Post date | 2004-06-24T12:06:53Z |
Hi all.
I have written a stored proc using the for select...do statement.
My problem: the body of the loop will be processed when
the select statement has no result (no record fit's to
the WHERE clause).
Is this the normal behaviour?
I would expect that the loop body is only processed if
records are found in the SELECT.
If this is the normal behaviour, what's the best
workaround to avoid the loop body beeing processed
when no record has been found?
Regards
Jürgen
I have written a stored proc using the for select...do statement.
My problem: the body of the loop will be processed when
the select statement has no result (no record fit's to
the WHERE clause).
Is this the normal behaviour?
I would expect that the loop body is only processed if
records are found in the SELECT.
If this is the normal behaviour, what's the best
workaround to avoid the loop body beeing processed
when no record has been found?
Regards
Jürgen