I create procedure which call procedure inside another. I have an error ORA-00900: invalid SQL statement.
CREATE OR REPLACE PROCEDURE AP_MOVE_OUT
is
BEGIN
EXECUTE IMMEDIATE 'AP_MOVEOUT_COUNT(''GNW-M2'',to_date(''2020-11-02'',''yyyy-MM-dd''),to_date(''2020-11-06'',''yyyy-MM-dd''),''ast'');';
END;
/
Procedure compiled without any error, but when I run it:
BEGIN
AP_MOVE_OUT;
END;
/
I've got an error: ORA-00900: invalid SQL statement ORA-06512: at "DEVUSER.AP_MOVE", line 4 ORA-06512: at line 2 00900. 00000 - "invalid SQL statement"
When I execute procedure AP_MOVEOUT_COUNT outside procedure AP_MOVE_OUT it works correctly, so I can't find the reason of these error. Here is the example that works for me outside procedure AP_MOVE_OUT:
EXEC AT_MOVEOUT_COUNT('GNW-M2',to_date('2020-11-02','yyyy-MM-dd'),to_date('2020-11-06','yyyy-MM-dd'),'ast');