﻿<?xml version='1.0' encoding='UTF-8'?><rss version="2.0" xmlns:dc="http://purl.org/dc/elements/1.1/"><channel><title>SQLServerCentral / Discuss Content Posted by Brian Knight / Article Discussions / Article Discussions by Author  / Using the CheckSum Function - SQL School Video / Latest Posts</title><generator>InstantForum.NET v2.9.0</generator><description>SQLServerCentral</description><link>http://www.sqlservercentral.com/Forums/</link><webMaster>notifications@sqlservercentral.com</webMaster><lastBuildDate>Tue, 21 May 2013 17:56:06 GMT</lastBuildDate><ttl>20</ttl><item><title>RE: Using the CheckSum Function - SQL School Video</title><link>http://www.sqlservercentral.com/Forums/Topic608873-31-1.aspx</link><description>First of all kudos to Brian for his videos.  I absolutely love them and have learned so much.  Secondly I agree with the others regarding the dangers of using CHECKSUM against string values due to the non-uniqueness of the result.  I think it's fairly safe to use across several numeric/date columns though.  I have never used HASHBYTES before, so this is a great tip as well.  Thank you!</description><pubDate>Sun, 21 Dec 2008 14:45:33 GMT</pubDate><dc:creator>mishaluba</dc:creator></item><item><title>RE: Using the CheckSum Function - SQL School Video</title><link>http://www.sqlservercentral.com/Forums/Topic608873-31-1.aspx</link><description>When implementing the HashBytes or CheckSum is it optimal to do these checks manually in the respective update stored procedure, or is it better to be used trigger based?  What is the best practice?My goal is to provide auditing (stored in a separate audit table) in sql server 2005 when a specific piece of data e.g. username or users password is modified, when the enter user row is updated. </description><pubDate>Fri, 19 Dec 2008 11:03:42 GMT</pubDate><dc:creator>anand.ramanan</dc:creator></item><item><title>RE: Using the CheckSum Function - SQL School Video</title><link>http://www.sqlservercentral.com/Forums/Topic608873-31-1.aspx</link><description>Agreed, having worked on a system where someone decided to implement checksums to manage change control I know from bitter experience that it will bite you at some point.  I think we found numbers that were related in some mathematical way (I forget exactly) would give the same value.  But we also had examples of company name strings that gave the same value.  If getting the integrity perfect is important I'd suggest not using this idea.  For something that is supposed to be a rare occurrence it happened surprisingly frequently!</description><pubDate>Fri, 19 Dec 2008 08:34:03 GMT</pubDate><dc:creator>jezman</dc:creator></item><item><title>RE: Using the CheckSum Function - SQL School Video</title><link>http://www.sqlservercentral.com/Forums/Topic608873-31-1.aspx</link><description>you should idd use MD5!using checksum results easily in duplicates , egselect checksum('eeeeeeeeeeeeeeee')select checksum('dddddddddddddddd')</description><pubDate>Fri, 19 Dec 2008 01:13:07 GMT</pubDate><dc:creator>emmanuel.vanneste</dc:creator></item><item><title>RE: Using the CheckSum Function - SQL School Video</title><link>http://www.sqlservercentral.com/Forums/Topic608873-31-1.aspx</link><description>Brian,That's an excellent tip!Wee're in the middle of a conversion project for HR &amp; FIN and this will absolutely help.Great Job!</description><pubDate>Thu, 18 Dec 2008 10:35:59 GMT</pubDate><dc:creator>patrickpk</dc:creator></item><item><title>RE: Using the CheckSum Function - SQL School Video</title><link>http://www.sqlservercentral.com/Forums/Topic608873-31-1.aspx</link><description>Nice one...</description><pubDate>Thu, 18 Dec 2008 00:34:52 GMT</pubDate><dc:creator>Anipaul</dc:creator></item><item><title>RE: Using the CheckSum Function - SQL School Video</title><link>http://www.sqlservercentral.com/Forums/Topic608873-31-1.aspx</link><description>That's true. There's a slight chance of duplicate checksums. Another technique that I've used is HASHBYTES similar to this:select HASHBYTES('md5',NAME + isnull(Color,'Unkown')), * FROM Production.ProductIt takes longer to run but it produces very unique values like 0x313FB214C93591081E720123253B1398.</description><pubDate>Wed, 17 Dec 2008 18:48:04 GMT</pubDate><dc:creator>Brian Knight</dc:creator></item><item><title>RE: Using the CheckSum Function - SQL School Video</title><link>http://www.sqlservercentral.com/Forums/Topic608873-31-1.aspx</link><description>this is a good/ dangerous technique.  I have implemented this is a production system and got burned by duplicate checksum values on different columns  (hash collision).  Them more data you can put into the check sum the less likely you will have duplicates. maybe. But good demo.</description><pubDate>Wed, 17 Dec 2008 16:51:39 GMT</pubDate><dc:creator>v-rsmith</dc:creator></item><item><title>Using the CheckSum Function - SQL School Video</title><link>http://www.sqlservercentral.com/Forums/Topic608873-31-1.aspx</link><description>Comments posted to this topic are about the item [B]&lt;A HREF="/articles/Video/65068/"&gt;Using the CheckSum Function - SQL School Video&lt;/A&gt;[/B]</description><pubDate>Tue, 25 Nov 2008 23:59:33 GMT</pubDate><dc:creator>Brian Knight</dc:creator></item></channel></rss>