Is there any equivalent function in SQL Server 2005 that will act in a similar fashion like the TRANSLATE funciton of ORACLE?
Well 1 option is to do with multiple REPLACE statement.
Another is to create a user define function.
I am talking about a built-in function in SQL Server (no work around)...
e.g. TRANSLATE('1tech23', '123', '456')
will result into 4tech56.
In SQL Server using REPLACE
the query will be
REPLACE(REPLACE(REPLACE('1tech23','1','4'),'2','5'),'3','6')
But for achieving the same set of result , I am using REPLACE
3 times which is a tedious job.
Thanks