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!

phone number format (999-999-9999)

Ramuplsql10Mar 13 2014 — edited Mar 13 2014

Hi ,

I want phone number 999-999-9999 this format, Below query working correctly but i want without using how to get this.

select regexp_replace(lpad(67890,10,'0'),'(.{3})(.{3})(.{4})','\1-\2-\3') from dual;

output : 000-006-7890

can any one suggest me.

Thanks,

This post has been answered by Solomon Yakobson on Mar 13 2014
Jump to Answer
Comments
Locked Post
New comments cannot be posted to this locked post.
Post Details
Locked on Apr 10 2014
Added on Mar 13 2014
7 comments
2,818 views