Quickie..
How do I format a phone number in my select statement? I assume I should use the tochar() function but I'm not sure exactly what to write. The phone number is stored as XXXXXXXXXX, and I want (XXX) XXX-XXXX.
Thanks!
Printable View
Quickie..
How do I format a phone number in my select statement? I assume I should use the tochar() function but I'm not sure exactly what to write. The phone number is stored as XXXXXXXXXX, and I want (XXX) XXX-XXXX.
Thanks!
Hi Szhark.
check this one.
select 'New Phone Number - ('||
substr(to_char(PHONE_NUM,'0999999999'),2,3)||') '||
substr(to_char(PHONE_NUM,'0999999999'),5,3)||' - '||
substr(to_char(PHONE_NUM,'0999999999'),8,4)
from YOUR_TABLE;
Thanks
ABC