Subject | Concatenating varchar2 fields |
---|---|
Author | Lourenço de Paula |
Post date | 2003-10-06T14:13:02Z |
Hi
I'm trying to concat three string fields, see:
SITUATION 1:
FIELD1 FIELD2 FIELD3
------ ------ ------
CONTENT1 CONTENT2 CONTENT3
Than I execute the select:
select FIELD1 || ' ' || FIELD2 || ' ' || FIELD3 from MYTABLE
and it returns "CONTENT1 CONTENT2 CONTENT3", but when one of the three fields is null the result is NULL, see:
SITUATION 2:
FIELD1 FIELD2 FIELD3
------ ------ ------
CONTENT1 CONTENT2 NULL
Than I execute the same select command:
select FIELD1 || ' ' || FIELD2 || ' ' || FIELD3 from MYTABLE
and it returns NULL instead of "CONTENT1 CONTENT2 ".
What I need to do to get this result??
Any help will be usefull
Thanks
Lourenço de Paula
lourenco.d@...
Desenvolvimento Revenda
CNP Engenharia de Sistemas S.A.
[Non-text portions of this message have been removed]
I'm trying to concat three string fields, see:
SITUATION 1:
FIELD1 FIELD2 FIELD3
------ ------ ------
CONTENT1 CONTENT2 CONTENT3
Than I execute the select:
select FIELD1 || ' ' || FIELD2 || ' ' || FIELD3 from MYTABLE
and it returns "CONTENT1 CONTENT2 CONTENT3", but when one of the three fields is null the result is NULL, see:
SITUATION 2:
FIELD1 FIELD2 FIELD3
------ ------ ------
CONTENT1 CONTENT2 NULL
Than I execute the same select command:
select FIELD1 || ' ' || FIELD2 || ' ' || FIELD3 from MYTABLE
and it returns NULL instead of "CONTENT1 CONTENT2 ".
What I need to do to get this result??
Any help will be usefull
Thanks
Lourenço de Paula
lourenco.d@...
Desenvolvimento Revenda
CNP Engenharia de Sistemas S.A.
[Non-text portions of this message have been removed]