Quantcast
Channel: dBforums – Everything on Databases, Design, Developers and Administrators
Viewing all articles
Browse latest Browse all 13329

db2 coalesce with concat columns replacing with null still shows special characters

$
0
0
Hi,

Can any one help me with this SQL.

I am creating a view where in a column say colC definition is based on concat of two other columns that are separated by ';' ( v.colA||';'||v.colB ). The requirement is that if the value of the concat'd columns are null it should return null. In the above case it happens to return ';' even if the result is null. I tried using coalesce but still it's giving same error.

coalesce(concat(concat(v.specialty_shops, ';'), v.face_category),'')
coalesce(v.specialty_shops||';'||v.face_category, NULL)

Can any one help,

Thanks

Viewing all articles
Browse latest Browse all 13329

Trending Articles