Subject Re: exists(EXECUTE STATEMENT ...
Author Svein Erling Tysvær
--- In firebird-support@yahoogroups.com, Bjoern Reimer wrote:
> Hi Helen,
>
> >>Hi,
> >>
> >> (Firebird 1.5.1 CS on Linux)
> >> in PSQL the following statement doesn't work:
> >>
> >> [...]
> >> "SQL" = 'SELECT "Id" FROM "SomeTable" WHERE "Fieldname" ='||
> >> "ParameterOfSP";
> >>
> >> IF (not exists(EXECUTE STATEMENT "SQL")) THEN
>
> I 've changed the query to a select count("Id")... INTO :"Counter"
> which perfectly works.

If this query potentially could return a huge number, then a

(for?) select 1 from rdb$database where exists(select "Id"...

would be quicker.

Set