• Status: Solved
  • Priority: Medium
  • Security: Public
  • Views: 2610
  • Last Modified:

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
0
Jason Yousef, MS
Asked:
Jason Yousef, MS
  • 4
  • 3
2 Solutions
 
RiteshShahCommented:
its 44
0
 
RiteshShahCommented:
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
0
 
Jason Yousef, MSSr. BI  DeveloperAuthor Commented:
RiteshShah:

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

is my expression looks ok?

REPLACE(PAT_NAME_File1,"char(44)"," ")
0
Get your problem seen by more experts

Be seen. Boost your question’s priority for more expert views and faster solutions

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


0
 
Jason Yousef, MSSr. BI  DeveloperAuthor Commented:
Your example works, but in SSIS expression doesn't work, any clue?
0
 
Reza RadConsultant, TrainerCommented:
your expression is correct.
what is your problem exactly?
do you read data from a flat file?
I checked this and this removed any comma in column,

let me know your whole problem , maybe there be a better way.
0
 
Jason Yousef, MSSr. BI  DeveloperAuthor Commented:
This actually worked for me.... but thanks anyway for your help

REPLACE(PAT_NAME_File1, "," ,"" )

0
 
Jason Yousef, MSSr. BI  DeveloperAuthor Commented:
Thanks
0
Question has a verified solution.

Are you are experiencing a similar issue? Get a personalized answer when you ask a related question.

Have a better answer? Share it in a comment.

Join & Write a Comment

Featured Post

Cloud Class® Course: CompTIA Healthcare IT Tech

This course will help prep you to earn the CompTIA Healthcare IT Technician certification showing that you have the knowledge and skills needed to succeed in installing, managing, and troubleshooting IT systems in medical and clinical settings.

  • 4
  • 3
Tackle projects and never again get stuck behind a technical roadblock.
Join Now