COncatenation with blank values

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
dr.murthy
Participant
Posts: 224
Joined: Sun Dec 07, 2008 8:47 am
Location: delhi

COncatenation with blank values

Post by dr.murthy »

Hi all,

Could you please let me know how to concatenate
two values with blank space.
my reqirement is some thing like
concatenate lastname and fristname
with blank value
foe example
fristname-->GIRI
lastname--->KIRAN
reqired reult is GIRI KIRAN
So far i tried with
fristname : ' ' : lastname

but its giving result 0

Any suggestions???
D.N .MURTHY
syeed
Participant
Posts: 19
Joined: Fri Jan 19, 2007 12:35 am
Location: bangalore

Re: COncatenation with blank values

Post by syeed »

fristname-->GIRI
lastname--->KIRAN
fristname:' ':lastname

dont give any spaces in between and then try, it is working for me.
Syed
---------
Wait and Watch
syeed
Participant
Posts: 19
Joined: Fri Jan 19, 2007 12:35 am
Location: bangalore

Re: COncatenation with blank values

Post by syeed »

fristname-->GIRI
lastname--->KIRAN
fristname:' ':lastname

dont give any spaces in between and then try, it is working for me.
Syed
---------
Wait and Watch
nani0907
Participant
Posts: 155
Joined: Wed Apr 18, 2007 10:30 am

Post by nani0907 »

Hi,
Are fisrt name and secomd names two different columns.

Use below logic

fristname : Space(1) : lastname .

Let me know how it works.

Thanks
Sana
thanks n regards
nani
Sainath.Srinivasan
Participant
Posts: 3337
Joined: Mon Jan 17, 2005 4:49 am
Location: United Kingdom

Post by Sainath.Srinivasan »

What is the datatype for target column ?
dr.murthy
Participant
Posts: 224
Joined: Sun Dec 07, 2008 8:47 am
Location: delhi

Post by dr.murthy »

nani0907 wrote:Hi,
Are fisrt name and secomd names two different columns.

Use below logic

fristname : Space(1) : lastname .

Let me know how it works.

Thanks
Sana
Hi ,

thanks for respond,

now its giving
fristnameSpace(1)astname.
not giving appropriate result
D.N .MURTHY
richdhan
Premium Member
Premium Member
Posts: 364
Joined: Thu Feb 12, 2004 12:24 am

Post by richdhan »

Hi Murthy,

1. What is the stage you are using?

2. As Sainath asked what is the datatype of the target column

This is pretty straight forward. You just have to use a transformer and use the following derivation

LinkName.FirstName:" ":Linkname.LastName

HTH
--Rich
dr.murthy
Participant
Posts: 224
Joined: Sun Dec 07, 2008 8:47 am
Location: delhi

Post by dr.murthy »

Sainath.Srinivasan wrote:What is the datatype for target column ?
Data type is varchar2
D.N .MURTHY
chulett
Charter Member
Charter Member
Posts: 43085
Joined: Tue Nov 12, 2002 4:34 pm
Location: Denver, CO

Post by chulett »

Where are you doing this, what stage?
-craig

"You can never have too many knives" -- Logan Nine Fingers
dr.murthy
Participant
Posts: 224
Joined: Sun Dec 07, 2008 8:47 am
Location: delhi

Post by dr.murthy »

hi,


now its working fine.

Thanks
D.N .MURTHY
rwierdsm
Premium Member
Premium Member
Posts: 209
Joined: Fri Jan 09, 2004 1:14 pm
Location: Toronto, Canada
Contact:

Post by rwierdsm »

If one of the variables are null, the whole string will evaluate to null: i.e.

Firstname: ' ' : Lastname

If Firstname = 'Rob'
Lastname - 'Wierdsma'
result will be 'Rob Wierdsma'

If Firstname = null
Lastname = 'smith'
result will be null.
Rob Wierdsma
Toronto, Canada
bartonbishop.com
Post Reply