Replace function is use to replace a string to the string that we want. Replace function takes three parameter
Syntax of the replace function is:-
REPLACE ('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:-
SELECT OREPLACE ('MYSELF','MY','');
O_REPLACE
----------------
SELF
SQL> SELECT OREPLACE ('MYSELF123','123',' CHANCHAL.');
O_REPLACE
----------------
MYSELF CHANCHAL.
Read Also:- Replace function in Teradata
Syntax of the replace function is:-
REPLACE ('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:-
SELECT OREPLACE ('MYSELF','MY','');
O_REPLACE
----------------
SELF
SQL> SELECT OREPLACE ('MYSELF123','123',' CHANCHAL.');
O_REPLACE
----------------
MYSELF CHANCHAL.
Read Also:- Replace function in Teradata