我想知道调用 REPLACE function described here 的合适方法是什么,因为我已经创建了下面的语句来测试它,但出现错误:
DECLARE
templateMessage3 VARCHAR2(50);
BEGIN
templateMessage3 := 'Dear Mr./Madam FNAME';
replace(templateMessage3, 'FNAME', 'Lilly');
DBMS_OUTPUT.PUT_LINE(templateMessage3);
END;
/
错误:
PLS-00221: 'REPLACE' is not a procedure or is undefined
我正在使用 Oracle 11g Web 界面。
最佳答案
REPLACE
是一个函数,而不是一个过程,因此使用以下语法:
templateMessage3 := replace(templateMessage3, 'FNAME', 'Lilly');
关于oracle - 无法在 PLSQL 中使用 REPLACE 函数,我们在Stack Overflow上找到一个类似的问题:https://stackoverflow.com/questions/23325661/