Link to home
Start Free TrialLog in
Avatar of Jason Yousef
Jason YousefFlag for United States of America

asked on

derived column to delete comma (,)

Hello,
I searched everywhere couldn't find out what the CHAR number for the comma.

I've this derived column query in SSIS to strip the commas from the full name.

REPLACE(Full_NAME_Column,", "," ")

John, Doe     to    John Doe


Please help

Thanks
ASKER CERTIFIED SOLUTION
Avatar of RiteshShah
RiteshShah
Flag of India image

Link to home
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
Start Free Trial
BTW, I have one small script on my blog which will show you all ASCII code and its associated character

http://www.sqlhub.com/2009/04/list-of-int-ascii-code-to-character-in.html
Avatar of Jason Yousef

ASKER

RiteshShah:

cheers and thanks for your reply
still doesn't work for me !

is my expression looks ok?

REPLACE(PAT_NAME_File1,"char(44)"," ")
declare @t varchar(10)
set @t='sqlhug,com'
select REPLACE(@t,char(44),' ')


Your example works, but in SSIS expression doesn't work, any clue?
SOLUTION
Avatar of Reza Rad
Reza Rad
Flag of New Zealand image

Link to home
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
Start Free Trial
This actually worked for me.... but thanks anyway for your help

REPLACE(PAT_NAME_File1, "," ,"" )

Thanks