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 -> Re: Global PL/SQL table

Re: Global PL/SQL table

From: Connor McDonald <connor_mcdonald_at_yahoo.com>
Date: Tue, 04 Apr 2000 18:17:29 +0800
Message-ID: <38E9C138.2E7D@yahoo.com>


Kyriakos Lambros wrote:
>
> Hello everyone,
>
> I am using Forms 5.0 and I am wondering if there is a way to make a
> pl/sql table as a global variable. I am trying to do something like:
>
> DECLARE
> TYPE t_OrgID IS TABLE OF NUMBER
> INDEX BY BINARY_INTEGER;
> v_org_id t_OrgID;
> BEGIN
> v_count := pick_list.get_picklist_element_count(pick_list.list_out);
>
> --Store the organizations that the user selected
> FOR i IN 1..v_count LOOP
> v_org_id(i) :=
> TO_NUMBER(pick_list.get_picklist_element_value(pick_list.list_out, i));
> :GLOBAL.v_org_id(i) := v_org_id(i);
> END LOOP;
>
> Is this even possible or will I have to use dynamic SQL to create and
> drop a scratch table.
>
> Thanks in advance,
>
> Kyriakos Lambros

Stick it in a package and it becomes "semi" global - ie within the current session, the package variables are persistent.

To go outside the current session, you could use a temporary table (if you're on 8i and above), or knock something up with dbms_aq.

HTH
--



Connor McDonald
http://www.oracledba.co.uk

We are born naked, wet and hungry...then things get worse Received on Tue Apr 04 2000 - 05:17:29 CDT

Original text of this message

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