Skip to Main Content

APEX

Announcement

For appeals, questions and feedback about Oracle Forums, please email oracle-forums-moderators_us@oracle.com. Technical questions should be asked in the appropriate category. Thank you!

pl/sql function body can pass validation and fetch data, but advisor throws compilation error - ORA-06550

Yahwei_LeeApr 28 2023 — edited Apr 28 2023

Dear apex gurus, i am new to apex.

I have an interactive report with source type as pl/sql function body return sql query, the code is as follows:

declare
sqlquerry varchar2(4000);
begin

IF (:P4_RADIO='SEARCH' AND :P4_LIST3='APPS PARCEL') then
sqlquerry :='select *
from APPSEOR.APPS_28DAY_RUN_CNT_MVW';
ELSE
sqlquerry :='select *
from APPSEOR.APPS_28DAY_RUN_CNT_MVW
where APPS_Total_Run_Time>1000
and rownum <3
order by APPS_Total_Run_Time
';
END IF;

return sqlquerry;

end;

it can pass validation, and run, and fetch data and show in the report, but advisor scanning throws error,

Compilation error - ORA-06550: line 18, column 7: PLS-00103: Encountered the symbol "end-of-file" when expecting one of the following: ; The symbol ";" was substituted for "end-of-file" to continue.

what is wrong with code? what should I change if I want to remove the error? thanks in advance.

Yawei

This post has been answered by hari-Oracle on May 2 2023
Jump to Answer
Comments
Post Details
Added on Apr 28 2023
2 comments
484 views