0

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

(DT_STR,9,1252)REPLACE(SSN,"-","")

and getting "12345678

0

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, privacy policy and cookie policy

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