Oracle
  Home arrow Oracle arrow Page 3 - Compile-Time Warnings for Oracle DB 10g
Dev Shed Forums  
Administration  
AJAX  
Apache  
BrainDump  
DHTML  
Flash  
Java  
JavaScript  
Multimedia  
MySQL  
Oracle  
Perl  
PHP  
Practices  
Python  
Reviews  
Security  
Smartphone Development  
Style-Sheets  
Web Services  
XML  
Zend  
Zope  
Mobile Linux  
App Generation ROI  
IBM® developerWorks  
Forums Sitemap  
E-Commerce Hosting  
Linux Web Hosting  
Managed Hosting  
Small Business Hosting  
VPS Hosting  
Weekly Newsletter

 
Developer Updates  
Free Website Content 
 RSS  Articles
 RSS  Forums
 RSS  All Feeds
Write For Us Get Paid  
Request Media Kit
Contact Us  
Site Map  
Privacy Policy  
Support  
 USERNAME
 
 PASSWORD
 
 
  >>> SIGN UP!  
  Lost Password? 
Google.com  
ORACLE

Compile-Time Warnings for Oracle DB 10g
By: O'Reilly Media
  • Search For More Articles!
  • Disclaimer
  • Author Terms
  • Rating: starstarstarstarstar / 2
    2007-11-08


    Table of Contents:
  • Compile-Time Warnings for Oracle DB 10g
  • PLW-05001: previous use of 'string' (at line string) conflicts with this use
  • PLW-05004: identifier string is also declared in STANDARD or is a SQL built-in
  • PLW-05005: function string returns without value at line string

  • Rate this Article: Poor Best 
      ADD THIS ARTICLE TO:
      error-file:tidyout.log Del.ici.ous error-file:tidyout.log Digg
      error-file:tidyout.log Blink error-file:tidyout.log Simpy
      error-file:tidyout.log Google error-file:tidyout.log Spurl
      error-file:tidyout.log Y! MyWeb error-file:tidyout.log Furl
    Email Me Similar Content When Posted
    Add Developer Shed Article Feed To Your Site
    Email Article To Friend
    Print Version Of Article
    PDF Version Of Article

     
     
    ADVERTISEMENT


    Compile-Time Warnings for Oracle DB 10g - PLW-05004: identifier string is also declared in STANDARD or is a SQL built-in
    ( Page 3 of 4 )

    Many PL/SQL developers are unaware of the STANDARD package, and its implications for their PL/SQL code. For example, it is common to find programmers who assume that names like INTEGER and TO_CHAR are reserved words in the PL/SQL language. That is not the case. They are, respectively, a datatype and a function declared in the STANDARD package.

    STANDARD is one of the two default packages of PL/SQL (the other is DBMS_STANDARD). Because STANDARD is a default package, you do not need to qualify references to datatypes like INTEGER, NUMBER, PLS_INTEGER, etc., with “STANDARD”—but you could, if you so desired.

    PLW-5004 notifies you if you happen to have declared an identifier with the same name as an element in STANDARD (or a SQL built-in; most built-ins—but not all—are declared in STANDARD).

    Consider this procedure definition:

      1  CREATE OR REPLACE PROCEDURE plw500 4
      2  IS
      3     INTEGER   NUMBER;
      4
      5     PROCEDURE TO_CHA R
      6     IS
      7     BEGIN
      8        INTEGER := 10;
      9     END TO_CHAR;
     10  BEGIN
     11     TO_CHAR;
     12  * END plw5004;

    Compile-time warnings for this procedure will display as follows:

      LINE/COL ERROR 
      -------- ---------------------------------
      3/4      PLW-05004: identifier INTEGER is
               also declared in STANDARD or is a
               SQL builtin
      5/14     PLW-05004: identifier TO_CHAR is
               also declared in STANDARD or is a
               SQL builtin

    You should avoid reusing the names of elements defined in the STANDARD pack age unless you have a very specific reason to do so.



     
     
    >>> More Oracle Articles          >>> More By O'Reilly Media
     

       

    ORACLE ARTICLES

    - Oracle's Turn to Play in the Sun
    - Implementing and Using Oracle`s Restore Poin...
    - Tuning PL/SQL Code
    - Debugging PL/SQL Code
    - Testing PL/SQL Code
    - Working With PL/SQL Code
    - Conditional Compilation for Oracle Database ...
    - Compile-Time Warnings for Oracle DB 10g
    - Compiling PL/SQL Code for an Oracle Database
    - Troubleshooting PL/SQL Code
    - Managing PL/SQL Code
    - Data Manipulation and More for HTML DB Appli...
    - Oracle Database Fundamentals
    - Adding Processes to HTML DB Applications
    - Adding Computations, Processes, and Validati...





    © 2003-2009 by Developer Shed. All rights reserved. DS Cluster 2 Hosted by Hostway
    For more Enterprise Application Development news, visit eWeek