PL/SQL (MOSC)

MOSC Banner

using DBMS_LOB.COMPARE on clobs in a trigger to compare old vs new

edited Feb 6, 2010 1:59AM in PL/SQL (MOSC) 9 commentsAnswered ✓
 I am working on an after-update trigger that will compare the old and new values of a clob column. The triggering statement would be "update mytable set CLOBCOL=my_updated_clob where thekey = primary-key-identifier".  However, the standard old vs new nomencature in the trigger does not seem to work:

if (dbms_lob.compare(:new.CLOBCOL,:old.CLOBCOL) != 0) then ...

The compare returns a null value.  I think it is because the :old.CLOBCOL is not open, so it has no lob locator reference.  How can I compare the old value to the new value?

Howdy, Stranger!

Log In

To view full details, sign in to My Oracle Support Community.

Register

Don't have a My Oracle Support Community account? Click here to get started.

Category Leaderboard

Top contributors this month

New to My Oracle Support Community? Visit our Welcome Center

MOSC Help Center