Case
when c.voice_phone_nbr <> '' Then '(' ||
substring (c.voice_phone_nbr from 1 for 3) || ') '
|| substring (c.voice_phone_nbr from 4 for 3) || '-'
|| substring (c.voice_phone_nbr from 7 for 4)
End as PHONE_NUMBER
QueryMan
By the way, I strongly urge you to store the area code and the phone number is seperate columms. if you should ever have occasion to fax using your stored phone numbers, it is a lot easier if you can test your area code and exchange seperately.
if area_code <> '801' then
if phone_number not like '778%'
call = phone_number
else
call = '1'||phone_number
end
else
call = '1'||area_code||phone_number
end I tried to remain child-like, all I acheived was childish.
This site uses cookies to help personalise content, tailor your experience and to keep you logged in if you register.
By continuing to use this site, you are consenting to our use of cookies.