RE: concatenating columns with null values
Posted in 2000
You should not be surprised, you should have expected this. After all,
a null is unknown, and it would be wrong to say that null followed by
'2' is the same as '2' alone.
-----Original Message-----
From: Pete Smith [mailto:pete.smith@aethos.co.uk]
Sent: Tuesday, March 07, 2000 11:43 AM
Posted To: informix
Conversation: concatenating columns with null values
Subject: concatenating columns with null values
Hi all
I'm surprised by the result I get when concatenating two columns and one
of them contains a null value.
In this case the returned expression is also null.
for example
create table t1 (c1 integer, c2 integer)
insert into t1 values (1,1);
insert into t1 (c1) values (2);
insert into t1 (c2) values (3);
select c1 || c2 from t1;
gives
(expression) 11
(expression)
(expression)
Am I right to be surprised or should I have expected this?
I was hoping to see something like:
(expression) 11
(expression) 2
(expression) 3
TIA
Pete