[英]Function returning error texts in Oracle APEX
I am trying to take a count of the records in the interactive grid and based on that I am trying to pass a message to the user.我正在尝试对交互式网格中的记录进行计数,并在此基础上尝试向用户传递消息。 However, I am getting error: ORA-06550: line 1, column 141: PLS-00103: Encountered the symbol "NUMBER" when expecting one of the following: :=.
但是,我收到错误消息:ORA-06550:第 1 行,第 141 列:PLS-00103:遇到以下符号之一时遇到符号“NUMBER”::=。 ( @ %; The symbol "." was substituted for "NUMBER" to continue.Following is my code in the validation. Validation Type is: Function Returning Error Text.
( @ %; 符号“.”被替换为“NUMBER”以继续。以下是我在验证中的代码。验证类型为:Function 返回错误文本。
l_count NUMBER := 0;
BEGIN
SELECT COUNT(1)
INTO l_count
FROM ugh
WHERE ugh.pre = :PRE
AND ugh.APP1 = :APP1
AND ugh.APP2 = :APP2
AND ugh.APP3 = :APP3
AND ugh.FINL_APP = :FINL_APP;
IF l_count > 1 THEN
IF END_DATE IS NULL THEN
RETURN 'Error Message to be displayed.';
ELSE
RETURN NULL;
END IF;
ELSE
RETURN NULL;
END IF;
END;
Can anyone please help?有人可以帮忙吗?
Looks like you're missing the DECLARE
keyword:看起来您缺少
DECLARE
关键字:
DECLARE --> this
l_count NUMBER := 0;
BEGIN
SELECT COUNT (1)
INTO l_count
FROM ugh
Also, what is END_DATE
?另外,什么是
END_DATE
? You never declared it.你从来没有声明过。 If it is a page item, then precede it with a colon,
:END_DATE
如果它是一个页面项目,那么在它前面加上一个冒号,
:END_DATE
声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.