0
SSN=LTRIM(RTRIM(REPLACE(A.SSN,'-','')))

Can some one please help me? This code replaces "-" with '' of ssn column which works. But now I want to also replace dots . with '' string. Can someone help me how to replace both - and .?

Any help will be highly appreciated.

Thank you

1 Answer 1

2

Use one more replace

LTRIM(RTRIM(REPLACE(REPLACE(A.SSN,'-',''),'.','')))

If you are using Oracle, the easiest way to do this is using regexp_replace to only get the digits.

regexp_replace(ssn, '\D', '')
Sign up to request clarification or add additional context in comments.

Comments

Your Answer

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

Start asking to get answers

Find the answer to your question by asking.

Ask question

Explore related questions

See similar questions with these tags.