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

Home -> Community -> Mailing Lists -> Oracle-L -> RE: interesting dynamic pl/sql question

RE: interesting dynamic pl/sql question

From: Igor Neyman <ineyman_at_perceptron.com>
Date: Thu, 09 Oct 2003 12:14:28 -0800
Message-ID: <F001.005D2956.20031009121428@fatcity.com>


You should be getting errors, because PL/SQL inside "execute immediate" knows nothing about "mystorageArray" (or "i" for that matter) declared in your stored procedure.
Probably, you could get by using "package" variables (and referring to them properly: package_name.var_name, specifically inside your dynamic sql).

Igor Neyman, OCP DBA
ineyman_at_perceptron.com

-----Original Message-----
rgaffuri_at_cox.net
Sent: Thursday, October 09, 2003 1:49 PM To: Multiple recipients of list ORACLE-L

Im on 8.1.7. Is it possible to do something like this? Im getting errors:

create or replace procedure myproc is

   TYPE myRecord is RECORD (

     field_1 number,
     field_2 number);

  TYPE storageArray IS TABLE OF myRecord     INDEX BY BINARY_INTEGER;
    myStorageArray storageArray;
   i number;
begin
 i := 1;
execute immediate

   ' begin
  mystorageArray.field_''i'' := 1;
  end; ';
end;
/

--

Please see the official ORACLE-L FAQ: http://www.orafaq.net
--

Author: <rgaffuri_at_cox.net
  INET: rgaffuri_at_cox.net

Fat City Network Services    -- 858-538-5051 http://www.fatcity.com
San Diego, California        -- Mailing list and web hosting services
---------------------------------------------------------------------
To REMOVE yourself from this mailing list, send an E-Mail message to: ListGuru_at_fatcity.com (note EXACT spelling of 'ListGuru') and in the message BODY, include a line containing: UNSUB ORACLE-L (or the name of mailing list you want to be removed from). You may also send the HELP command for other information (like subscribing).

--

Please see the official ORACLE-L FAQ: http://www.orafaq.net
--

Author: Igor Neyman
  INET: ineyman_at_perceptron.com

Fat City Network Services    -- 858-538-5051 http://www.fatcity.com
San Diego, California        -- Mailing list and web hosting services
---------------------------------------------------------------------
To REMOVE yourself from this mailing list, send an E-Mail message to: ListGuru_at_fatcity.com (note EXACT spelling of 'ListGuru') and in the message BODY, include a line containing: UNSUB ORACLE-L (or the name of mailing list you want to be removed from). You may also send the HELP command for other information (like subscribing). Received on Thu Oct 09 2003 - 15:14:28 CDT

Original text of this message

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