How to get checksum for multiple columns?
361137Jun 29 2011 — edited Jun 29 2011I need to compare the data from one record in one table to the data in another table. The two tables structures are not the same, but the datatypes of the columns I cam comparing are of course the same. There are many columns so I thought a shortcut to doing a crazy long A=A AND B=B, etc.... for many dozens of times everytime I need to check if the data is different was to use checksum.
I planned to use it by concatenating all the columns together in one string, delmitted by a semi-colon.
However I am finding this is not working as hoped. The checksum produces the same number for different values of data. So I need ot use something else.
Is there another function I could use in a similar way where it will create a compact, unique hash for a long concatenated string I pass?
And what is the datatype of the return value - hoping its a numeric!