Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations strongm on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

Oracle Translate Function in SQL Server 1

Status
Not open for further replies.

psamedy

Technical User
Apr 22, 2002
60
US
Hello all,

I'm looking for a sql server function that works similar to the TRANSLATE function in ORACLE. I have social secturity field currently in format ###-##-####, that i'd like to change to ######### (without the dashes). The TRANSLATE function would work as follows:

TRANSLATE('123-45-6789','-','') would return 123456789

Thanks Pat
 
The function you are looking for is REPLACE

e.g REPLACE('123-45-6789','-','') would return 123456789



Nathan

[yinyang]
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top