Some sort of Informix equivalent of cksum on an SQL result
Posted on 2009-05-04
I have a connection to a remote database that I want to regularly check for data changes. To determine whether there's been a change, I don't want to have to download the entire SQL result and compare it with the previous result.
What would solve my issue is the equivalent of the cksum command in linux, which gives a digital fingerprint of a file. That way, I would be able to just compare the fingerprint of the remote SQL with the fingerprint of the same SQL run on my local database, and download the full result when they differed.
One idea I had was something like a bitwise-sum of the md5 function result run on a column, but I'm not aware of Informix being able to manage a bitwise sum OR md5!
All suggestions appreciated, but yes I do know it would be lovely if there was a trigger on the remote table that updated a changedate upon changing... I can't change the remote database though.