Special Charcters

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
ppp
Participant
Posts: 21
Joined: Mon Aug 31, 2009 11:53 am

Special Charcters

Post by ppp »

I have an input column called the Telephone field which is varchar. It has data such as below:

Telephone

(999) 999 9999
999-999-9999
999 999 9999
999/9999999
999*9999999

How can I strip off all these special characters and just keep the numbers? I want a format like 9999999999.
I know I can strip the white space off but how should I deal with the other characters?
[/u]
DSguru2B
Charter Member
Charter Member
Posts: 6854
Joined: Wed Feb 09, 2005 3:44 pm
Location: Houston, TX

Post by DSguru2B »

Use the Convert() function to convert anything other than a number to a an empty space.
Creativity is allowing yourself to make mistakes. Art is knowing which ones to keep.
ppp
Participant
Posts: 21
Joined: Mon Aug 31, 2009 11:53 am

Post by ppp »

Thank you so much. It worked.
Post Reply