Concatenation

Post questions here relative to DataStage Enterprise/PX Edition for such areas as Parallel job design, Parallel datasets, BuildOps, Wrappers, etc.

Moderators: chulett, rschirm, roy

Post Reply
cherry
Participant
Posts: 108
Joined: Sun Jul 10, 2005 1:35 am

Concatenation

Post by cherry »

Hi All,

I have two fields to concatenate

A=(011)7171361
B=(o)

C=A:B

When I do Concatenation of A:B iam getting the value as C=A(B value is not concatenated)

But when I do C=B:A this is working fine.

Do some one has clue why this is not working for C=A+B

Iam writing the data to a DataSet

Regards
Cherry
algfr
Participant
Posts: 106
Joined: Fri Sep 09, 2005 7:42 am

Re: Concatenation

Post by algfr »

cherry wrote:Hi All,

I have two fields to concatenate

A=(011)7171361
B=(o)

C=A:B

When I do Concatenation of A:B iam getting the value as C=A(B value is not concatenated)

But when I do C=B:A this is working fine.

Do some one has clue why this is not working for C=A+B

Iam writing the data to a DataSet

Regards
Cherry
Hi Cherry

You have to make sure that B is not null (seems to be the case for you).

So I suggest you do this :

If isNull(A) Then '' Else 'A' : If isNull(B) Then '' Else 'B'

Please update if that works

Arnaud
chulett
Charter Member
Charter Member
Posts: 43085
Joined: Tue Nov 12, 2002 4:34 pm
Location: Denver, CO

Post by chulett »

Was wondering about that, but if one was null neither 'direction' would work. :?
-craig

"You can never have too many knives" -- Logan Nine Fingers
Sainath.Srinivasan
Participant
Posts: 3337
Joined: Mon Jan 17, 2005 4:49 am
Location: United Kingdom

Post by Sainath.Srinivasan »

Are they char or varchar ? What are their lengths ?

Make all varchar and do a trim on A and B.
Post Reply