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

Home -> Community -> Mailing Lists -> Oracle-L -> Re: How to process "long" in trigger?

Re: How to process "long" in trigger?

From: Thomas Day <tomdaytwo_at_gmail.com>
Date: Fri, 21 Sep 2007 12:05:33 -0400
Message-ID: <9f0e18730709210905i399e4e29y6009fda91bbcab42@mail.gmail.com>


The way that we "handle" longs in materialized views is to create the target table with all the columns except the long column. We then create another table with the primary key and the long column. The materialized view goes on the first table along with an IUD trigger. When the materialized view is refreshed the trigger fires and uses PL/SQL to copy the primary key and the long column into the second table (or update or delete as appropriate). We then have a view that joins the materialized view and the long column table for the end users to look at.

The PL/SQL can copy 16,000 bytes of the long. Anything more than that and we generate an error.

It's a pain. LONG was a really, really bad idea (though I suspect at the time that it seemed great).

--
http://www.freelists.org/webpage/oracle-l
Received on Fri Sep 21 2007 - 11:05:33 CDT

Original text of this message

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