I was wondering what is the appropriate way to call the REPLACE function described here, since I've created the statement below to test it but I'm getting an error:
DECLARE
templateMessage3 VARCHAR2(50);
BEGIN
templateMessage3 := 'Dear Mr./Madam FNAME';
replace(templateMessage3, 'FNAME', 'Lilly');
DBMS_OUTPUT.PUT_LINE(templateMessage3);
END;
/
Error:
PLS-00221: 'REPLACE' is not a procedure or is undefined
I am using Oracle 11g web interface.
REPLACE
is a function, not a procedure, so use the following syntax:
templateMessage3 := replace(templateMessage3, 'FNAME', 'Lilly');
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With