Re: procedures and packages in SQL*Plus
Date: Fri, 11 Jul 2008 19:50:57 +0200
Message-ID: <48779D81.5040808_at_gmail.com>
Malcolm Dew-Jones schrieb:
> Tim Slattery (Slattery_T_at_bls.gov) wrote:
> : I can enter stored procedures/functions and packages in SQL*Plus,
> : that works fine. Except when there's a syntax error someplace. Then it
> : tells me something like "Warning: Package Body created with
> : compilation errors." But it doesn't tell me WHAT the errors are! It
> : doesn't work that way with an anonymous PL/SQL block, that gives a
> : fine syntax error report.
>
> : Is there something I can set to get it to tell me what it objects to?
> : I scanned the list of SET options, tried autotrace and flagger, still
> : lost.
>
> sql> show errors
>
> If there aren't any errors then it says "No errors.", and it's cleared
> after each successful code creation, so it's useful to to simply call
> it every time.
>
> prompt creating foobar
> _at_foobar
> show error
>
> prompt creating bazbar
> _at_bazbar
> show error
>
>
Alternatively, errors can be shown for particular object
SQL> create or replace package a
2 is
3 a number
4 end;
5 /
Warning: Package created with compilation errors.
SQL> create or replace package b
2 is
3 b number;
4 end;
5 /
Package created.
SQL> sho error
No errors.
SQL> sho error package a
Errors for PACKAGE A:
LINE/COL ERROR
-------- ----------------------------------------------------------------- 4/1 PLS-00103: Encountered the symbol "END" when expecting one of the following: := . ( _at_ % ; not null range default character The symbol ";" was substituted for "END" to continue.
Best regards
Maxim Received on Fri Jul 11 2008 - 19:50:57 CEST