Subject Re: [firebird-support] COALESCE and gpre in FB 1.5.1
Author Thad Humphries
I've submitted this bug, #1012895, along with an ESQL C program that
demostrates the problem.

I also downloaded the FB 1.5.1.4481 source and poked briefly around the gpre
souce directory. There is no COALESCE in the parser code, nor NULLIF. There
is a CASE, but no matching WHEN. Sure enough, attempting to substitute CASE
for COALESCE in ESQL, with or without WHEN, fails.

On Wednesday 18 August 2004 21:25, Helen Borrie wrote:
> At 03:44 PM 18/08/2004 -0400, you wrote:
> >... I get errors in EXEC
> > SQL commands where I use COALESCE:
> >
> >$ /opt/firebird/bin/gpre -c -n -m o_process.e
> >(E) o_process.e:234: expected FROM, encountered "("
> >(E) o_process.e:302: expected FROM, encountered "("
> > 2 errors, no warnings
> >
> >Line 234, for example, looks like
> >
> >232 ...
> >232 EXEC SQL
> >233 SELECT
> >234 procid, COALESCE(procname,' '), wfmcstate,
> >235 ...
> >
> >COALESCE does work from ISQL. What am I missing in ESQL?
>
> Can you try this and see whether it still fails?
> 232 ...
> 232 EXEC SQL
> 233 SELECT
> 234 procid, COALESCE(procname,' ') as procname, wfmcstate,
> 235 ...
>
> If it does continue to fail, would you kindly assemble a test case and
> submit a bug report for gpre?

--
Thad Humphries "...no religious test shall ever be required
Web Development Manager as a qualification to any office or public
Phone: 540/675-3015, x225 trust under the United States." -Article VI