Subject Re: [firebird-support] stored procedures and sqlcode
Correction:

> if exists ( select... from... where... ) then

should be:

if ( exists ( select... from... where... ) ) then

PV