Board index » delphi » String concatenating in Interbase

String concatenating in Interbase

I have a problem with string concatenating in Interbase. With the synrax
"SELECT FNAME ||
LNAME AS NAME" the NAME will get a null value when either FNAME or LNAME
is null. This is according to standard T-SQL, but in Sybase ans MSSQL
you can write "SELECT
ISNULL(FNAME," ") + LNAME AS NAME" and the query will exchange a blank
whenever it
encounters a FNAME with a null value. (The + is the same as || in
Interbase).

Is there any way to do this in Interbase?

Thanks in advance.

 

Re:String concatenating in Interbase


Hi !

You need an UDF to do that. If there is noone available (don't remember
whether FreeUDFLib has this function), e-mail me, and I'll write you the code
to create one.

--
Bj?rge S?ther
Konsulent & Utvikler
bsaet...@online.no
Drengsrudveien 44, 1385 ASKER
Telefon +47 66 90 38 03
Mobil +47 90 82 22 39
Fax +47 66 90 27 85
"Lars Martinsen" <lars.martin...@eurosoft.no> skrev i melding
news:38D9CD63.86568DD0@eurosoft.no...

Quote
> I have a problem with string concatenating in Interbase. With the synrax
> "SELECT FNAME ||
> LNAME AS NAME" the NAME will get a null value when either FNAME or LNAME
> is null. This is according to standard T-SQL, but in Sybase ans MSSQL
> you can write "SELECT
> ISNULL(FNAME," ") + LNAME AS NAME" and the query will exchange a blank
> whenever it
> encounters a FNAME with a null value. (The + is the same as || in
> Interbase).

> Is there any way to do this in Interbase?

> Thanks in advance.

Other Threads