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 -> Re: REPOST: Copying a LONG via Trigger?

Re: REPOST: Copying a LONG via Trigger?

From: Nicholas Couch <nbcouch_at_envisionet.net>
Date: Fri, 12 Mar 1999 23:52:55 GMT
Message-ID: <36e9a8c9.31466674@mindmeld.idcomm.com>


I've been wrestling with this problem myself recently. You can't use :old or :new on a long column. In fact, there are quite a few things you can't do with longs. I wish I had a workaround for you. In Oracle8 you can use BLOB data types, which don't have all the restrictions of longs.

nbc

On Thu, 11 Mar 1999 07:44:28 -0700 Ken Rachynski <krachyn_at_cadvision.com> wrote:

>Good day,
>
>This message was originally posted on Monday. As it is now Thursday and
>nobody has chosen to answer, I'm going to ask again.
>
>I have a routine that I used to copy the contents of one table to
>another where both had a LONG column, so I know I can move the LONG data
>
>between tables. However, this was for a mass copy of records.
>
>I wrote a trigger (before delete for each row) to insert the record into
>
>an archive table. This works fine execpt for the LONG column was the
>only column not inserted into the archive. How do I insert the data from
>
>the current record into the archive table for the LONG column?
>
>Below is a copy of the trigger I'm trying to use, the Notes column is a
>LONG and is not getting copied to the destination table.
>
>CREATE OR REPLACE TRIGGER comms_bef_del_row
>BEFORE DELETE
>ON comms
>FOR EACH ROW
>BEGIN
> INSERT INTO acomms
> VALUES (:old."Comm ID", :old."Contact ID", :old."Project Lead
>ID",
> :old."Topic", :old."Entry Date", :old."Entry By",
> :old."Modified Date", :old."Modified By", :old."Exchange",
>
> :old."Signature", SYSDATE, USER, :old."Notes");
>END;
>
>Thanks in advance for any replies.
>
>--
>Ken Rachynski
>Database Analyst
>krachyn_at_cadvision.com
><http://www.cadvision.com/krachyn>
>ICQ: 3113514
>
>
Received on Fri Mar 12 1999 - 17:52:55 CST

Original text of this message

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