Compare CLOB's and hilite difference
Date: Sat, 28 Mar 2009 08:59:57 -0600
Does anybody have any code they could share that compares two CLOB's and hilites the differences?
My app stores a 'history' of the entire record (with all sub-table data) in an XML-typ CLOB field. I'd like to be able to do something similar to Wikipedia, where the users select two records to compare, and have the differences hilited.
The CLOB's are stored in the same table, along with other info, i.e. userid, timestamp, dep_id (the tie to the master record), and a sequence I use for the PK in this table. Each line in the CLOB is terminated with a CHR(10).
The CLOBS are usually around 68K each, and I'm having a devil of a time looping around through each CLOB and comparing the results on those that are over 32K in size.
I realize the above is really basic, so more info can be provided if needed. I started with just a procedure, but that quickly became extremely difficult to follow, so I started on trying to rewrite into a package. Then I figured I might as well see if somebody has already 'invented' something similar so I didn't have to reinvent the wheel.
- Bill Ferguson -- http://www.freelists.org/webpage/oracle-l