Welcome to plsql4all.blogspot.com SQL, MYSQL, ORACLE, TERADATA, MONGODB, MARIADB, GREENPLUM, DB2, POSTGRESQL.

Wednesday 27 August 2014

OREPLACE Function in Teradata

Replace function is use to replace a string to the string that we want. Replace function takes three parameter
In Teradata, there is no such function called replace but there is a function called OREPLACE, but we need to install the function.

You can download and install the function from below link.

DOWNLOAD OREPLACE FUNCTION

Syntax of the replace function is:-

OREPLACE ('STRING1','STRING2','STRING3');

Here:-

STRING1 is the values from which you need to replace a string.

STRING2 is the value by which you need to replace a string.

STRING3 is the values which is going to be replaced.

Example is:-

SEL OREPLACE ('MYSELF','MY','') ;

O_REPLACE
----------------
SELF

SEL OREPLACE ('MYSELF123','123',' CHANCHAL.') ;

O_REPLACE
----------------
MYSELF CHANCHAL.




Read Also:-  Replace function in MySql
Please provide your feedback in the comments section above. Please don't forget to follow.