Infosphere's Quality Product
Moderators: chulett , rschirm
divstands
Participant
Posts: 128 Joined: Wed Jun 03, 2009 9:48 am
Post
by divstands » Thu Jun 25, 2009 9:25 am
Can a particluar string/text be cleared in the transformer in DataStage
For example:
If an input field is "SAN PEDRO 7777777 ARRIBA"
and we want to remove 7777777 and produce the output as
"SAN PEDRO ARRIBA"
Can this be done? If yes, please help with the syntax.
Divya
JRodriguez
Premium Member
Posts: 425 Joined: Sat Nov 19, 2005 9:26 am
Location: New York City
Contact:
Post
by JRodriguez » Thu Jun 25, 2009 10:08 am
Oconv(InputCol, "MCA")
Julio Rodriguez
ETL Developer by choice
"Sure we have lots of reasons for being rude - But no excuses
divstands
Participant
Posts: 128 Joined: Wed Jun 03, 2009 9:48 am
Post
by divstands » Thu Jun 25, 2009 11:06 am
JRodriguez wrote: Oconv(InputCol, "MCA")
I guess OCONV would not help for my requirement. I looked for it. Hope CHANCE function helps
Divya
JRodriguez
Premium Member
Posts: 425 Joined: Sat Nov 19, 2005 9:26 am
Location: New York City
Contact:
Post
by JRodriguez » Thu Jun 25, 2009 12:00 pm
Ohh! you are only parallel then this will do the trick
Convert("0123456789",'', InputCol )
Also while standardizing your data you can assign the null class to numeric token....
Julio Rodriguez
ETL Developer by choice
"Sure we have lots of reasons for being rude - But no excuses
divstands
Participant
Posts: 128 Joined: Wed Jun 03, 2009 9:48 am
Post
by divstands » Thu Jun 25, 2009 12:49 pm
JRodriguez wrote: Ohh! you are only parallel then this will do the trick
Convert("0123456789",'', InputCol )
Also while standardizing your data you can assign the null class to numeric token....
no... i just want to remove 77777777 if it exist in the string
Divya
divstands
Participant
Posts: 128 Joined: Wed Jun 03, 2009 9:48 am
Post
by divstands » Thu Jun 25, 2009 12:50 pm
JRodriguez wrote: Ohh! you are only parallel then this will do the trick
Convert("0123456789",'', InputCol )
Also while standardizing your data you can assign the null class to numeric token....
no... i just want to remove 77777777 if it exist in the string
Divya
JRodriguez
Premium Member
Posts: 425 Joined: Sat Nov 19, 2005 9:26 am
Location: New York City
Contact:
Post
by JRodriguez » Thu Jun 25, 2009 1:16 pm
If is only 77777777 that you want to remove then
Convert("7",'', InputCol )
It will only remove the string if exist ...else your input value will return
Julio Rodriguez
ETL Developer by choice
"Sure we have lots of reasons for being rude - But no excuses
ray.wurlod
Participant
Posts: 54607 Joined: Wed Oct 23, 2002 10:52 pm
Location: Sydney, Australia
Contact:
Post
by ray.wurlod » Thu Jun 25, 2009 4:11 pm
Or a simple If..Then..Else expression in a Transformer stage.
IBM Software Services Group
Any contribution to this forum is my own opinion and does not necessarily reflect any position that IBM may hold.
chulett
Charter Member
Posts: 43085 Joined: Tue Nov 12, 2002 4:34 pm
Location: Denver, CO
Post
by chulett » Thu Jun 25, 2009 5:58 pm
Don't guess, read the docs! Search the forums for a posted PX version of the Server EReplace function by DSGuru2B, that will do the substitution you need.
-craig
"You can never have too many knives" -- Logan Nine Fingers