Subject Re: [firebird-support] question: stored proc and FOR SELECT...DO
Author Martijn Tonies
Hi,

> 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.

That's how it is.

You probably have done something wrong in your code --

1) how are you checking that the body is being processed?

2) care to show some code?

With regards,

Martijn Tonies
Database Workbench - developer tool for InterBase, Firebird, MySQL & MS SQL
Server.
Upscene Productions
http://www.upscene.com