Page 1 of 1

Special Character Removal

Posted: Wed Dec 05, 2012 12:17 am
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..

Posted: Wed Dec 05, 2012 12:25 am
by jerome_rajan
Wouldn't the convert function solve your problem?

Code: Select all

convert(colname,""'_'& #","")

Posted: Wed Dec 05, 2012 12:37 am
by chulett
Or the dreaded double convert which an exact search here will turn up. :wink:

Posted: Wed Dec 05, 2012 2:24 am
by ray.wurlod
Do you have your client's authority to remove them? After all, they ARE a part of their data.