concatenating string

Post questions here relative to DataStage Server Edition for such areas as Server job design, DS Basic, Routines, Job Sequences, etc.

Moderators: chulett, rschirm, roy

Post Reply
kjaouhari
Participant
Posts: 325
Joined: Thu Mar 16, 2006 10:22 am

concatenating string

Post 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 ?
ArndW
Participant
Posts: 16318
Joined: Tue Nov 16, 2004 9:08 am
Location: Germany
Contact:

Post 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?
JeroenDmt
Premium Member
Premium Member
Posts: 107
Joined: Wed Oct 26, 2005 7:36 am

Re: concatenating string

Post 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
garthmac
Charter Member
Charter Member
Posts: 55
Joined: Tue Oct 21, 2003 9:17 am
Location: UK

Post by garthmac »

I use the transform srNVL on each input column to set NULLS to empty strings before concatinating.
Garth
kjaouhari
Participant
Posts: 325
Joined: Thu Mar 16, 2006 10:22 am

Post by kjaouhari »

Thanks all,

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

It's works good!
Post Reply