Oracle FAQ Your Portal to the Oracle Knowledge Grid
HOME | ASK QUESTION | ADD INFO | SEARCH | E-MAIL US
 

Home -> Community -> Usenet -> c.d.o.misc -> INSERT in PL/SQL

INSERT in PL/SQL

From: Anton Eskov <anton_at_msoft.ru>
Date: Wed, 6 May 1998 10:56:07 +0400
Message-ID: <894437642.271509@telecom.lek.ru>


Hi

I have discovered the following behaviour in PL/SQL. Is it possible to explain it?

Let's consider the following package:

create or replace package test as

    procedure x;
end test;
/

create or replace package body test as

    function y(param1 in number) return number;     procedure x is
    begin

        INSERT INTO T VALUES( y(1) );
    end x;

    function y(param1 in number) return number is     begin

        return (param1 * 2);
    end y;
end test;
/

The package compiles without any problem, but when a call to procedure x is made,ORA-904 "invalid column name" error is generated in INSERT statement.

It starts to work when function y is declared in package specification (with appropriate pragma) and package qualifier is used in the call in the package body (i.e. the INSERT statement looks like following:

INSERT INTO T VALUES ( test.y(1) );

SY
Anton

P.S. Configuration:
Oracle7 Server Release 7.3.3.0.0 - Production Release PL/SQL Release 2.3.3.0.0 - Production Received on Wed May 06 1998 - 01:56:07 CDT

Original text of this message

HOME | ASK QUESTION | ADD INFO | SEARCH | E-MAIL US