Re: bulk collect ..

Re: bulk collect ..

 

  

First I perform the initial select into cursor 1 for...
BEGIN
OPEN 1;=20
FETCH 1 BULK COLLECT INTO=20
coltab1,coltab2,coltab3.....
(defined as TYPE col1TAB IS TABLE OF =col.table%TYPE;
coltab1 col1Tab;)
;
CLOSE 1
Then I have to pass the coltabn values to another procedure...for =
validation to update other columns
selected before being inserted/displayed.
FOR i IN CBQ_1 LOOP
validate_the_column_values_and_update(coltab1,.....coltabn)
END LOOP;
Then...
SELECT Name, MemberId INTO coltab1, coltab2
FROM clienttable WHERE Id =3D coltab3;
IF coltab2 IS NULL THEN
coltab2 :=3D coltab1;
END IF;
this goes on for about 20 validation steps.

Then the final insert into the depository/display table...then a =
rollback.
Done.
If this makes any sense to you and you have any insights...thanks.!

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


> Sorry John,
> But what Ron is trying to accomplish is *NOT* to update the table as You
did
> but update a collection variable.
> In your below example that would be updating *array*.....
>
> Regards,
> Regis
>
> -----Original Message-----
> From: Lewis, John (Litton) [mailto:John.[Email Address Removed] Sent: Thursday, October 31, 2002 4:41 PM
> To: LazyDBA.com Discussion
> Subject: RE: bulk collect ..
>
>
>
> Yes. Snippet of code follows:
>
>
> select cols bulk collect into array
>
> forall i in array.first..array.last
> update a_table
> set approved = 'Y'
> where account_no = array(i)
>
>
>
> regards,
> john f. lewis
>
>
> -----Original Message-----
> Regis,
> Is it possible to perform an UPDATE on a "index by table collection" as
> below:?
>
>
>
>
> *********************************************************************
> 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

Oracle LazyDBA home page