Oracle FAQ | Your Portal to the Oracle Knowledge Grid |
![]() |
![]() |
Home -> Community -> Usenet -> c.d.o.server -> Re: Insert LONG type to another table by trigger: Internal error
Hello,
It is indeed no practical to process LONG fields in triggers. But I think it can be done at the price of much extra complexity. As you are not allowed to use the :new value, the idea is just to select it from the table. So you add a query on the table itself: SELECT longfield INTO ctmp FROM table WHERE pkfield = :new.pkfield Then you can do the processing with the ctmp, which is of a VRACHAR2 of maximum size
Of course you will hit the mutating table error when you try to select from the table itself from within a row-level trigger. But there are thousands of work-arounds for that.
And, eh, hmm, somehow it does not always process the full LONG field even if temporary variable is large enough. Not sure if this is an error in my code but if you have large documents, there is problems to be expected.
Bye,
Edzard
Received on Thu Mar 14 2002 - 11:12:43 CST
![]() |
![]() |