Subject Re: [firebird-support] Token unknown: exists
Author Doru Constantin
Thomas Steinmaurer wrote:

> > environment: winxpsp1 + fb1.5-rc8
> > code:
> > [line 9] if exists (select 1 from rdb$relations where
> > rdb$relation_name = 'theTable') then ...
> >
> > in ibexpert I get:
> >
> > Invalid token.
> > Dynamic SQL Error.
> > SQL error code = -104.
> > Token unknown - line 9, char 6.
> > exists.
>
> If you are talking about a PSQL code module, then *always*
> enclose the entire condition with parentheses.
>
> IF (EXISTS(...)) THEN ...
>
>
> HTH,
> Thomas Steinmaurer
> Logging/Auditing Suite for InterBase and Firebird
> http://www.iblogmanager.com
> Logging/Auditing Suite for Advantage Database Server 7
> http://www.adslogmanager.com

thank you!