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


Hei!

I guess you could use UNION, or write a stored procedure returning what
you want.

Generally, I think IB-specific questions are more likely to get the best
answers at some IB-specific newsgroups, e.g. interbase.public.general or
mers.interbase.list

Svein Erling

Quote
Lars Martinsen wrote:

> 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