Jens Stier wrote:
>
> hi there,
>
>
> i have two column c1 and c2
>
> in a select statement i concatenate both of them:
>
> select c1&', '&c2 from tbl
>
> here my problem: if one of the columns is null, the
> concatenated string c1&'
> '&c2 is also null, no matter what the other column contains.
>
>
> is there another way to concatenate two columns in a select
> statement? maybe
> an sth. like
>
> if(c1 is null)
> then c2
> else c1&', '&c2
You have two chances:
1. use SQLMODE Oracle, where NULL || 'something' resp. 'something' || NULL result in
'something'
2. use SQLMODE internal (the default) and VALUE (c1,'')&','&VALUE(c2,'')
where '' are two single quotes (one empty string)
Elke
SAP Labs Berlin
_______________________________________________
sapdb.general mailing list
[EMAIL PROTECTED]
http://listserv.sap.com/mailman/listinfo/sapdb.general