mikeysmailbox1
asked on
Oracle SQL - clob compare
Hi
I am executing the following to compare a clog that is within 2 different tables.
select dbms_lob.compare(a.MESSAGE ,b.MESSAGE )
from CMS_MAIL a,CMR_MAIL b
where b.ORDERNO = '4'
and a.JOBNO = '6';
I need the query to output if the same = 0 if different = 1
Not sure how to do this.
Thanks
Mike
I am executing the following to compare a clog that is within 2 different tables.
select dbms_lob.compare(a.MESSAGE
from CMS_MAIL a,CMR_MAIL b
where b.ORDERNO = '4'
and a.JOBNO = '6';
I need the query to output if the same = 0 if different = 1
Not sure how to do this.
Thanks
Mike
ASKER CERTIFIED SOLUTION
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
It should already return 0 if they are the same, non-zero if different and NULL if one (or both) of the LOBs are invalid.
If you must have 1, then I would add a simple case statement that would evaluate to 1 if it is non-zero.