Link to home
Start Free TrialLog in
Avatar of tdsimpso
tdsimpso

asked on

How do I compare two strings/CLOB in Oracle 9.2?


How do I compare two strings/CLOBs in Oracle 9.2?
I have a new CLOB value and I need to compare it with another CLOB value in a table.  If the new and old values are different, I need to update the table.  Otherwise, I move on to the next record.

Is there a PL/SQL function that can compare two CLOBs with each other?

Thanks,
Troy
Avatar of tdsimpso
tdsimpso

ASKER

Would it be better if I convert the two CLOB's into an Integer Value and compare the values?

Thanks,
Troy
ASKER CERTIFIED SOLUTION
Avatar of paquicuba
paquicuba
Flag of United States of America image

Link to home
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
Start Free Trial
 1  SELECT A.COL1
  2  FROM CLOB1 A, CLOB2 B
  3* WHERE DBMS_LOB.COMPARE(A.COL1,B.COL1)= 0
SQL> /

COL1
--------------------------------------------------------------------------------
ABCDEFGHIJK
LMNOPQRST