RE: bulk collect ..

RE: bulk collect ..

 

  

I don't know if that is possible...I haven't seen this.
What are trying to complish ?
You could use CAST or the old fashion DECODE to do the trick before
processing further...

Regis

-----Original Message-----
From: Ron Kranz [mailto:[Email Address Removed] Thursday, October 31, 2002 4:30 PM
To: LazyDBA.com Discussion; Regis Biassala
Subject: Re: bulk collect ..


Regis,

Is it possible to perform an UPDATE on a "index by table collection" as
below:?

begin
FORALL IN l_c1.FIRST..l_c1.LAST
UPDATE l_c1 SET l_c1 = A
WHERE l_c1 IS NOT NULL
;
end;
/


----- Original Message -----
From: "Regis Biassala" <Regis.[Email Address Removed] "LazyDBA.com Discussion" <[Email Address Removed] Thursday, October 31, 2002 6:46 AM
Subject: RE: bulk collect ..


> Here changed:
> create table table1(c1 varchar2(1), c2 number);
>
> insert into table1 values('R', 1);
> insert into table1 values('B', 4);
> insert into table1 values('Z', 3);
> commit;
>
>
> declare
> type r1 is table of table1.c1%type index by binary_integer;
> type r2 is table of table1.c2%type index by binary_integer;
> l_c1 r1;
> l_c2 r2;
>
> begin
> select c1, c2
> bulk collect into l_c1, l_c2
> from table1;
> end;
> /
>
>
> Note: You cannot mix multiple rows(RECORD) with an PL/SQL table(index by
> table)
> Advice: Always use index by table collection, instead of Nested tables or
> Varrays WHEN CODING with PL/SQL(strong constructs)
>
> hth,
> Regis
>
> -----Original Message-----
> From: Desu, Ramesh (CONS FIN, TCS Consultancy, CONSULTANT)
> [mailto:Ramesh.[Email Address Removed] Sent: Thursday, October 31, 2002 11:21 AM
> To: LazyDBA.com Discussion
> Subject: bulk collect ..
>
>
> Hi,
>
> What is wrong with the following code ?
>
> TIA
> Rd
>
>
> declare
> type r1 is record (c1 varchar2(1), c2 number );
>
> type t1 is table of r1 index by binary_integer;
>
> tab1 t1 ;
> begin
> select c1,c2
> bulk collect into tab1
> from table1;
> ....
> ....
> end;
>
>
> --------
> Oracle documentation is here:
> http://tahiti.oracle.com/pls/tahiti/tahiti.homepage
> To unsubscribe: send a blank email to oracledba-[Email Address Removed] To subscribe: send a blank email to oracledba-[Email Address Removed] Visit the list archive: http://www.LAZYDBA.com/odbareadmail.pl
> Tell yer mates about http://www.farAwayJobs.com
> By using this list you agree to these
> terms:http://www.lazydba.com/legal.html
> *********************************************************************
> This electronic transmission is strictly confidential and intended solely
> for the addressee. It may contain information which is covered by legal,
> professional or other privilege. If you are not the intended addressee,
> you must not disclose, copy or take any action in reliance of this
> transmission. If you have received this transmission in error,
> please notify the sender as soon as possible.
>
> This footnote also confirms that this message has been swept
> for computer viruses.
> **********************************************************************
>
>
> --------
> Oracle documentation is here:
http://tahiti.oracle.com/pls/tahiti/tahiti.homepage
> To unsubscribe: send a blank email to oracledba-[Email Address Removed] To subscribe: send a blank email to oracledba-[Email Address Removed] Visit the list archive: http://www.LAZYDBA.com/odbareadmail.pl
> Tell yer mates about http://www.farAwayJobs.com
> By using this list you agree to these
terms:http://www.lazydba.com/legal.html
*********************************************************************
This electronic transmission is strictly confidential and intended solely
for the addressee. It may contain information which is covered by legal,
professional or other privilege. If you are not the intended addressee,
you must not disclose, copy or take any action in reliance of this
transmission. If you have received this transmission in error,
please notify the sender as soon as possible.

This footnote also confirms that this message has been swept
for computer viruses.
**********************************************************************

Oracle LazyDBA home page