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
ASKER CERTIFIED SOLUTION
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
1 SELECT A.COL1
2 FROM CLOB1 A, CLOB2 B
3* WHERE DBMS_LOB.COMPARE(A.COL1,B. COL1)= 0
SQL> /
COL1
-------------------------- ---------- ---------- ---------- ---------- ---------- ----
ABCDEFGHIJK
LMNOPQRST
2 FROM CLOB1 A, CLOB2 B
3* WHERE DBMS_LOB.COMPARE(A.COL1,B.
SQL> /
COL1
--------------------------
ABCDEFGHIJK
LMNOPQRST
ASKER
Thanks,
Troy