I'm trying to implement Oracle REPLACE() function in teradata using SQL statements only. I searched the forum , but found Oreplace() UDF as the only solution. Can someone help me in implementing this is pure teradata SQL ??
Depends upon what you want to do, usually you can do it using different combinations of functions like, CASE WHEN, SUBSTR, LENGTH or CHAR_LENGTH, POSITION etc.
If possible, post the sample of data on which you want to apply REPLACE and can help in converting it in pure teradata SQL.
you shouldn't try to implement REPLACE with basic SQL functions, it's not worth doing it.
Better get your dba to install oREPLACE (and some more Oracle UDFs like oTRANSLATE).
Thanks for the response guys.
Carlos -- I couldnt find any Oreplace function in TD 14. Could you help me in using in ver 14.
dnoeth - you're right . but we need to go through a hell lot of proocesses and approvals for this. Thats why i was thinking of SQL implemtation . anyways , thanks for the suggestion. If nothing works out at the end , this would be the only solution.
"SQL Functions, Operators, Expressions, and Predicates". OREPLACE() Pag 720.
Before you can use the embedded services functions, you must run the Database Initialization
Program (DIP) utility and execute the DIPALL or DIPSYSFNC script. DIPALL is executed as
part of system installation.