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!

Error with Automation using PL/SQL Function Body returning Boolean

Leonardo_MoreraDec 30 2024 — edited Dec 30 2024

Hi

I'm trying to create an Automation initiated on a PL/SQL Function Body returning Boolean, but I get following error: ORA-06550: line 17, column 14: PLS-00382: expression is of wrong type.

Code is basic, only returns True/False by a condition :

DECLARE
vnmCount INTEGER := 0;
vb_result boolean;
BEGIN
APEX_CUSTOM_AUTH.SET_USER('PAY_OWNER');

select 1
into vnmCount
from pay_t_periods
where COALESCE(automatic,'N') = 'S'
and trunc(SYSDATE) = trunc((end_date - COALESCE(aut_exec_date,0)))
and process_lov = 'NOMINA'
and STATUS_PERIOD_LOV = 'OPEN';

IF (vnmCount > 0) THEN
vb_result := true;
RETURN (vb_result);
ELSE
vb_result := FALSE;
RETURN (vb_result);
END IF;
END;


Apex version: 24.1.4

This post has been answered by Steve Muench-Oracle on Dec 31 2024
Jump to Answer
Comments
Post Details
Added on Dec 30 2024
8 comments
464 views