Page 1 of 1

concatenating string

Posted: Tue May 23, 2006 2:35 am
by kjaouhari
Hi all ,

I want in a transformer to do :
column1:' ':column2 ---> target
55 :' ': KK ---->55 KK
And when column1 is empty I'm expecting to have
column2 -->target

but I have nothing in target

Do you have an idea ?

Posted: Tue May 23, 2006 4:17 am
by ArndW
Are you doing a simple derivation in a transform stage? If your first column is empty, what output are you getting that is wrong?

Re: concatenating string

Posted: Tue May 23, 2006 5:06 am
by JeroenDmt
If one of the two columns is NULL, the result will be NULL and not what you're expecting.
You'll have to catch the NULL and convert it to an empty string

Posted: Tue May 23, 2006 5:42 am
by garthmac
I use the transform srNVL on each input column to set NULLS to empty strings before concatinating.

Posted: Tue May 23, 2006 6:33 am
by kjaouhari
Thanks all,

I use the DS transform to set NULLS to empty strings in my concatinating.

It's works good!