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

Home -> Community -> Mailing Lists -> Oracle-L -> Varrays

Varrays

From: Goulet, Dick <DGoulet_at_vicr.com>
Date: Sun, 10 Oct 2004 22:33:21 -0400
Message-ID: <4001DEAF7DF9BD498B58B45051FBEA6501B9D8A2@25exch1.vicorpower.vicr.com>


To All,

        I've RTFM'd, and scanned through everything I could find on Metalink, but damned if I can figure this one out, easily. Here's the problem:

        We had a duhveloper who thought it would be a good thing to store multiple archive tapes in a varray within a table instead of having a second table to join on. Therefore he created the following:

Create type hist_tape_id as varray(30) of number; Create table module_master(model_number varchar2(20),......., archive_tape_id number, historical_tape_id hist_tape_id);

The problem is that 100% of the rows in this table have an archive_tape_id, but the historical_tape_id is null. 10% have more than one value stored in the historical_tape_id. Now I know the idea was that there would never be a need in the future for historical tapes, but as with many things times change & now I'm stuck trying to figure out how to add to the historical_tape_id column. So the question is< how to you add values to the historical_tape_id column without loosing the existing values. The books say you have to "recreate" it. Metalink is no help either since they keep confusing it with a nested table.

Dick Goulet
Senior Oracle DBA
Oracle Certified 8i DBA

--
http://www.freelists.org/webpage/oracle-l
Received on Sun Oct 10 2004 - 21:28:57 CDT

Original text of this message

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