Special Character Removal

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
venkatvelpula
Participant
Posts: 80
Joined: Sat Mar 18, 2006 10:27 pm

Special Character Removal

Post by venkatvelpula »

Hi,

I am looking to remove any character like ",'_',&, #, hexadecimal characters etc from a given string. That means, I would like to clean the string to have only alpha numeric characters ( 0-9 & A-Z). I know we can identify certain string contains alpha numeric characters only by using the alphanumeric function but how to identify those characters in the string and delete them in datastage. Please advise.

If this is something is not feasible in datastage, I am using sql server database. If anyone has experience doing this at sql server database level that will be great to know too..
jerome_rajan
Premium Member
Premium Member
Posts: 376
Joined: Sat Jan 07, 2012 12:25 pm
Location: Piscataway

Post by jerome_rajan »

Wouldn't the convert function solve your problem?

Code: Select all

convert(colname,""'_'& #","")
Jerome
Data Integration Consultant at AWS
Connect With Me On LinkedIn

Life is really simple, but we insist on making it complicated.
chulett
Charter Member
Charter Member
Posts: 43085
Joined: Tue Nov 12, 2002 4:34 pm
Location: Denver, CO

Post by chulett »

Or the dreaded double convert which an exact search here will turn up. :wink:
-craig

"You can never have too many knives" -- Logan Nine Fingers
ray.wurlod
Participant
Posts: 54607
Joined: Wed Oct 23, 2002 10:52 pm
Location: Sydney, Australia
Contact:

Post by ray.wurlod »

Do you have your client's authority to remove them? After all, they ARE a part of their data.
IBM Software Services Group
Any contribution to this forum is my own opinion and does not necessarily reflect any position that IBM may hold.
Post Reply