Subject Re: [ib-support] Null and Concatenate
Author Helen Borrie
At 04:17 PM 16-10-02 +0200, you wrote:
>I have to concatenate some fields
>SELECT FIELD1 || FIELD2 AS TOT FROM MYTABLE;
>
>But sometimes FIELD1 or FIELD2 is NULL
>how can I do for having TOT not NULL in this case ?

If your server in on Windows:

select sNvl(Field1, '') || sNvl(Field2,'') as TOT...

You need to install the sNvl UDF from fbudf.dll. Unfortunately, if your
server is Linux you'll need to get your set from a selectable stored proc
that handles the null cases.

heLen