Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations gkittelson on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

sqlplus - how to see compilation errors 1

Status
Not open for further replies.

Calator

Programmer
Feb 12, 2001
262
AU
I get a "function created with compilation errors" message but don't get the errors displayed - how can I see what the errors were?
SQL> CREATE OR REPLACE FUNCTION "MERUSER"."BB_GET_SUPPLIER_NAME" (I_SUPPLIER_NO IN CHAR) RETURN CHAR AS V_SUPPLIER_NAME meruser.MSV200.SUPPLIER_NAME%TYPE;SELECT SUPPLIER_NAME INTO V_SUPPLIER_NAME FROM meruser.MSV200 WHERE SUPPLIER_NO = I_SUPPLIER_NO; RETURN V_SUPPLIER_NAME; END;
2 /

Warning: Function created with compilation errors.

SQL> show errors
No errors.
 
Code:
SELECT * FROM ALL_ERRORS WHERE NAME = 'BB_GET_SUPPLIER_NAME'
and owner = 'MERUSER';

For Oracle-related work, contact me through Linked-In.
 
Thank - that works ok - however what I would need is ther errros to be logged into the spool file that documents the process of creating views and functions form an automated script. there are hundreds of functions/views created, the output is spooled, then I need to check if there were any errors (this curently happens as the warning message is logged) and if errors occurred I need to see what they were (this does not happen). The script has coded 'Show errors' aftre each Create statement, this was supposed to log the errors, but it does not happen. Any solution? Thanks
 
Obviously, you could just replace your show errors with the select statement. Alternatively, why don't you just do a general "select * from all_errors" after everything has run and see which packages have errors logged against them ?

For Oracle-related work, contact me through Linked-In.
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top