Connor and Chris will both be at AI World from October 12 to October 17 , the premier Oracle conference of 2025. If you're in Vegas, please come say Hi or pop into our sessions
Thanks for the question, Don.
Asked: December 20, 2018 - 5:50 pm UTC
Last updated: December 21, 2018 - 9:20 am UTC
Version: 12c
Viewed 1000+ times
SQL> ho type errors.sql REM Script: whenever sqlerror REM Control distribution scripts with whenever sqlerror whenever sqlerror exit SQL.SQLCODE create or replace package TEST1 is procedure test_procedure; end TEST1; / sho errors create or replace package body TEST1 is procedure test_procedure as begin for i in ( select 1 as N from foo ) loop DBMS_OUTPUT.put_line (i.N); end loop i; end; end TEST1; / sho errors create or replace view TEST_VIEW as select 1 as N from dual; create or replace view TEST_VIEW2 as select 1 as N from foo; create or replace view TEST_VIEW3 as select 2 as N from dual; SQL> @errors Package created. No errors. Warning: Package Body created with compilation errors. Errors for PACKAGE BODY TEST1: LINE/COL ERROR -------- ----------------------------------------------------------------- 9/9 PL/SQL: SQL Statement ignored 10/14 PL/SQL: ORA-00942: table or view does not exist 13/9 PL/SQL: Statement ignored 13/31 PLS-00364: loop index variable 'I' use is invalid View created. select 1 as N from foo * ERROR at line 2: ORA-00942: table or view does not exist Disconnected from Oracle Database 12c Enterprise Edition Release 12.2.0.1.0 - 64bit Production
Check out more PL/SQL tutorials on our LiveSQL tool.
PL/SQL reference manual from the Oracle documentation library