Subject Re: [firebird-support] "for select" and break
Author Daniel Rail

At September 5, 2003, 13:38, Henrik Sitter wrote:

> Hello,

> I would like to do something like:

> for select aValue
> from aTable
> into aVariable
> do
> begin
> if (aVariable = anInputVariable) then
> break;
> end
> .
> .
> /* rest of code */
> .
> .

> The 'break' is not valid syntax, but is there a simple way to accomplish
> break out of a 'for select' loop?

For FB 1.0, you can use EXIT, but that will stop the execution of the
stored procedure.

The good news is that it is implemented in FB 1.5, which is at RC5
stage. There should be a RC6 before final release. But, I can tell you
that I don't have any problems using it in production at the moment.

Best regards,
Daniel Rail
Senior System Engineer
ACCRA Group Inc. (
ACCRA Med Software Inc. (