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
dr.murthy
Participant
Posts: 224 Joined: Sun Dec 07, 2008 8:47 am
Location: delhi
Post
by dr.murthy » Thu Mar 05, 2009 1:08 am
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
Post
by syeed » Thu Mar 05, 2009 1:21 am
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
Post
by syeed » Thu Mar 05, 2009 1:22 am
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 » Thu Mar 05, 2009 1:23 am
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
dr.murthy
Participant
Posts: 224 Joined: Sun Dec 07, 2008 8:47 am
Location: delhi
Post
by dr.murthy » Thu Mar 05, 2009 5:15 am
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
Posts: 364 Joined: Thu Feb 12, 2004 12:24 am
Post
by richdhan » Thu Mar 05, 2009 5:31 am
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 » Thu Mar 05, 2009 6:34 am
Sainath.Srinivasan wrote: What is the datatype for target column ?
Data type is varchar2
D.N .MURTHY
chulett
Charter Member
Posts: 43085 Joined: Tue Nov 12, 2002 4:34 pm
Location: Denver, CO
Post
by chulett » Thu Mar 05, 2009 6:37 am
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 » Thu Mar 05, 2009 6:56 am
hi,
now its working fine.
Thanks
D.N .MURTHY
rwierdsm
Premium Member
Posts: 209 Joined: Fri Jan 09, 2004 1:14 pm
Location: Toronto, Canada
Contact:
Post
by rwierdsm » Thu Mar 05, 2009 8:24 am
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