简体   繁体   中英

Call stored procedure from oracle package

This is my sql

DECLARE
out_arg1 VARCHAR(30);
out_arg2 VARCHAR(30);
out_arg3 NUMERIC;
BEGIN
call MYPACKAGE.MyProcedure('A1405','3C',NULL,NULL,out_arg1 ,out_arg2 ,out_arg3 ,NULL);
dbms_output.put_line('Result 1: ' || out_arg1 );
dbms_output.put_line('Result 2: ' || out_arg2 );
dbms_output.put_line('Result 3: ' || out_arg3 );
END;

After executing I have this exception

Encountered the symbol "MYPACKAGE" when expecting one of the following...

I'm 100% sure that I have this package and I have this stored procedure in it. Furthermore, I have a code that calls this procedure and everything works fine until I try to call it manually.

Could you please tell me what am I missing ?

Try follwing:

DECLARE
out_arg1 VARCHAR(30);
out_arg2 VARCHAR(30);
out_arg3 NUMERIC;
BEGIN
MYPACKAGE.MyProcedure('A1405','3C',NULL,NULL,out_arg1 ,out_arg2 ,out_arg3 ,NULL);
dbms_output.put_line('Result 1: ' || out_arg1 );
dbms_output.put_line('Result 2: ' || out_arg2 );
dbms_output.put_line('Result 3: ' || out_arg3 );
END;

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM