Translate [message #373527] |
Fri, 20 April 2001 15:05 |
VGU
Messages: 1 Registered: April 2001
|
Junior Member |
|
|
Hi,
I am trying to translate a format (i.e)
from 999/999-9999 to 9999999999.
I could do this by using 'replace' twice
select replace(replace('999/999-9999','-'),'/') phone from dual.
Is there any other way without repeating the function twice?
All the help will be appreciated.
Thanks,
VGU
|
|
|
Re: Translate [message #373536 is a reply to message #373527] |
Sun, 22 April 2001 20:13 |
Joseph Stiehm
Messages: 4 Registered: April 2001
|
Junior Member |
|
|
try
select translate('999/999-9999','a-/','a') phone from dual
the first replacement is a dummy...the character 'a' in this case should never show up in your original string...every character after will be eliminated.
Joseph Stiehm
|
|
|
|
|