I have a table that has column SSN. The datatype is Varchar2. The values in this column are in the format 123456789. I want the values to be displayed as 123-45-6789. What SQL to Write? Please help me.
Who is Participating?
Guy Hengel [angelIII / a3]Connect With a Mentor Billing EngineerCommented:
SELECT SUBSTR(SSN,0,3) || '-' || SUBSTR(SSN, 3,2) || '-' || SUBSTR(SSN,5,4)
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.

All Courses

From novice to tech pro — start learning today.