Skip to Main Content

SQL & PL/SQL

Announcement

For appeals, questions and feedback about Oracle Forums, please email oracle-forums-moderators_us@oracle.com. Technical questions should be asked in the appropriate category. Thank you!

Converting 9 digit numbers to SSN Format (for output) NEED HELP

607128Nov 6 2007 — edited Nov 6 2007
I am trying to do a SELECT to get all SSN which are in the database as 9 digit numbers. What I want to do is output these 9 digit numbers as NNN-NN-NNNN instead of NNNNNNNNN

So when SSN colum reads out it would not look like this:
007830838

it would look like this instead:

007-83-0838

How would I do the SELECT statement properly?
It might go something like -- SELECT SSN from database.tablename;
only with an added proper function to convert the output.

Thanks,
-T
Comments
Locked Post
New comments cannot be posted to this locked post.
Post Details
Locked on Dec 4 2007
Added on Nov 6 2007
4 comments
1,213 views