Page 1 of 1

Concatenation

Posted: Mon Apr 11, 2011 2:19 pm
by times29
Hi,
i am trying to do concat in transformer getting error
to_transf.NFNAME || ':'|| to_transf.LNAME

Thanks

Posted: Mon Apr 11, 2011 2:26 pm
by chulett
DataStage uses a semi-colon for concatenation, let the Expression Builder put it together for you if you are unsure.

Posted: Mon Apr 11, 2011 2:32 pm
by samsuf2002
to_transf.NFNAME : to_transf.LNAME

Should be good.

Posted: Mon Apr 11, 2011 2:53 pm
by times29
problem is want sumthing like Firstname:lastname can we do that in transformer

Posted: Mon Apr 11, 2011 2:58 pm
by Nagaraj
pretty straight forward expression...dsgurus have already mentioned it. please try it and let us know if you are getting the desired results.

Posted: Mon Apr 11, 2011 3:01 pm
by samsuf2002
If you want ':' between Firstname and LastName then use in column derivation

Code: Select all

FirstName:':':LastName

Posted: Mon Apr 11, 2011 4:45 pm
by ray.wurlod
Beware null values. Null concatenated to anything will result in null. You must handle this. For example:

Code: Select all

NullToValue(InLink.LastName,"?") : ", " : NullToEmpty(InLink.FirstName)