Subject | String concatination |
---|---|
Author | Planles |
Post date | 2004-09-14T18:34:09Z |
Hi!
I use following sql to get customers id and ful name:
select CUST_KEY,CUST_NAME1 || ' ' || CUST_NAME2 AS CUST_FULL_NAME from
CUSTOMERS
The problem is, if there is no CUST_NAME2 defined (value of CUST_NAME2 is
NULL), there is also CUST_FULL_NAME for this customer NULL.
Example:
NAME1 = Primoz
NAME2 = Planinc
FULL_NAME = Primoz Planinc
But if:
NAME1 = Primoz
NAME2 =
FULL_NAME =
But it should be
FULL_NAME = Primoz
How can I solve this problem ?
Regards,
Primoz
I use following sql to get customers id and ful name:
select CUST_KEY,CUST_NAME1 || ' ' || CUST_NAME2 AS CUST_FULL_NAME from
CUSTOMERS
The problem is, if there is no CUST_NAME2 defined (value of CUST_NAME2 is
NULL), there is also CUST_FULL_NAME for this customer NULL.
Example:
NAME1 = Primoz
NAME2 = Planinc
FULL_NAME = Primoz Planinc
But if:
NAME1 = Primoz
NAME2 =
FULL_NAME =
But it should be
FULL_NAME = Primoz
How can I solve this problem ?
Regards,
Primoz