dbTalk Databases Forums  

procedures and packages in SQL*Plus

comp.databases.oracle.tools comp.databases.oracle.tools


Discuss procedures and packages in SQL*Plus in the comp.databases.oracle.tools forum.



Reply
 
Thread Tools Display Modes
  #11  
Old   
Maxim Demenko
 
Posts: n/a

Default Re: procedures and packages in SQL*Plus - 07-11-2008 , 12:50 PM






Malcolm Dew-Jones schrieb:
Quote:
Tim Slattery (Slattery_T (AT) bls (DOT) 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
@foobar
show error

prompt creating bazbar
@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:
:= . ( @ % ; not null range default character
The symbol ";" was substituted for "END" to continue.

Best regards

Maxim


Reply With Quote
  #12  
Old   
Maxim Demenko
 
Posts: n/a

Default Re: procedures and packages in SQL*Plus - 07-11-2008 , 12:50 PM






Malcolm Dew-Jones schrieb:
Quote:
Tim Slattery (Slattery_T (AT) bls (DOT) 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
@foobar
show error

prompt creating bazbar
@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:
:= . ( @ % ; not null range default character
The symbol ";" was substituted for "END" to continue.

Best regards

Maxim


Reply With Quote
  #13  
Old   
Maxim Demenko
 
Posts: n/a

Default Re: procedures and packages in SQL*Plus - 07-11-2008 , 12:50 PM



Malcolm Dew-Jones schrieb:
Quote:
Tim Slattery (Slattery_T (AT) bls (DOT) 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
@foobar
show error

prompt creating bazbar
@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:
:= . ( @ % ; not null range default character
The symbol ";" was substituted for "END" to continue.

Best regards

Maxim


Reply With Quote
  #14  
Old   
Maxim Demenko
 
Posts: n/a

Default Re: procedures and packages in SQL*Plus - 07-11-2008 , 12:50 PM



Malcolm Dew-Jones schrieb:
Quote:
Tim Slattery (Slattery_T (AT) bls (DOT) 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
@foobar
show error

prompt creating bazbar
@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:
:= . ( @ % ; not null range default character
The symbol ";" was substituted for "END" to continue.

Best regards

Maxim


Reply With Quote
  #15  
Old   
Maxim Demenko
 
Posts: n/a

Default Re: procedures and packages in SQL*Plus - 07-11-2008 , 12:50 PM



Malcolm Dew-Jones schrieb:
Quote:
Tim Slattery (Slattery_T (AT) bls (DOT) 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
@foobar
show error

prompt creating bazbar
@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:
:= . ( @ % ; not null range default character
The symbol ";" was substituted for "END" to continue.

Best regards

Maxim


Reply With Quote
Reply




Thread Tools
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

vB code is On
Smilies are On
[IMG] code is On
HTML code is Off



Powered by vBulletin Version 3.5.3
Copyright ©2000 - 2012, Jelsoft Enterprises Ltd.