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 -> Update of the object table

Update of the object table

From: Alex Vilner <alex_at_sinoma.com>
Date: 21 Aug 2002 14:05:15 -0700
Message-ID: <22e9f6e0.0208211305.3558fc28@posting.google.com>


Hello!

I have the following structures defined: CREATE OR REPLACE TYPE TEST_TYPE AS OBJECT (

      N1               NUMBER (5) 
     ,C1                  VARCHAR2(9) 

)
/

CREATE OR REPLACE TYPE TEST_TYPE_TABLE AS TABLE OF TEST_TYPE
/

In the stored proc, I declare and populate the object table:

lMemoryTab TEST_TYPE_TABLE;         

CURSOR lCursor IS
SELECT ...
FROM YYY;          OPEN lCursor;                 

FETCH lCursor BULK COLLECT
INTO lMemoryTab;

I also need to update the table -- as if it was a regular table. Since it has "columns", I can do a SELECT:
SELECT * FROM TABLE( CAST( lMemoryTab AS TEST_TYPE_TABLE) );

But can I do the UPDATE with a WHERE Clause, for example? I do not need the update that references the specific row in this memory table, but rather does a SQL-like update.

Thank you! Received on Wed Aug 21 2002 - 16:05:15 CDT

Original text of this message

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