So I am getting CSV Files and for some reason they are coming as "123-45-9873".

Now I trim the "-" out but the column is an SSN column so I am left with "12345987 taking the 3 out and putting the " character on the table.

What replace function can I use to replace the very character?

For reference, this is what I am doing


and getting "12345678

1 Answer 1


Looks like the quote (") character is considered a part of the input string.

There is two options:
1. correct you flat file source to define quotation characters for this field, so it will remove " values from the beginning and end of the string.
2. Use another replace to get rid of quotes.REPLACE(REPLACE(SSN,"\"",""),"-","")

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Not the answer you're looking for? Browse other questions tagged or ask your own question.