Get only numbers from an alpha numeric string

Post questions here relative to DataStage Server Edition for such areas as Server job design, DS Basic, Routines, Job Sequences, etc.

Moderators: chulett, rschirm, roy

Post Reply
yabhinav
Participant
Posts: 37
Joined: Wed Mar 05, 2008 11:54 pm
Location: Hyderabad

Get only numbers from an alpha numeric string

Post by yabhinav »

Hi,

Is there a function in DataStage which will return only numbers when an alpha-numeric string is passed as input to the function?
If not is there any other way to achieve this without using a routine.

Ex:
If input (919)-9727, the output should to be 9199727

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

Post by chulett »

There is the DIGITS transform that will do that for you.
-craig

"You can never have too many knives" -- Logan Nine Fingers
yabhinav
Participant
Posts: 37
Joined: Wed Mar 05, 2008 11:54 pm
Location: Hyderabad

Post by yabhinav »

Thanks Craig.
Post Reply