Skip to Main Content

SQL & PL/SQL

Announcement

For appeals, questions and feedback about Oracle Forums, please email oracle-forums-moderators_us@oracle.com. Technical questions should be asked in the appropriate category. Thank you!

How to get checksum for multiple columns?

361137Jun 29 2011 — edited Jun 29 2011
I 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!
This post has been answered by JustinCave on Jun 29 2011
Jump to Answer
Comments
Locked Post
New comments cannot be posted to this locked post.
Post Details
Locked on Jul 27 2011
Added on Jun 29 2011
11 comments
19,782 views