SQL Clone
SQLServerCentral is supported by Redgate
 
Log in  ::  Register  ::  Not logged in
 
 
 


BINARY CHECKSUM


BINARY CHECKSUM

Author
Message
Sriram-288748
Sriram-288748
Right there with Babe
Right there with Babe (760 reputation)Right there with Babe (760 reputation)Right there with Babe (760 reputation)Right there with Babe (760 reputation)Right there with Babe (760 reputation)Right there with Babe (760 reputation)Right there with Babe (760 reputation)Right there with Babe (760 reputation)

Group: General Forum Members
Points: 760 Visits: 340
Comments posted to this topic are about the item BINARY CHECKSUM

Sriram
Ronald H
Ronald H
SSCommitted
SSCommitted (1.6K reputation)SSCommitted (1.6K reputation)SSCommitted (1.6K reputation)SSCommitted (1.6K reputation)SSCommitted (1.6K reputation)SSCommitted (1.6K reputation)SSCommitted (1.6K reputation)SSCommitted (1.6K reputation)

Group: General Forum Members
Points: 1638 Visits: 630
Anyone who still uses text variables should be shot, especially because it makes me read the question wrong.

Ronald Hensbergen

Help us, help yourself... Post data so we can read and use it: http://www.sqlservercentral.com/articles/Best+Practices/61537/
-------------------------------------------------------------------------
2+2=5 for significant large values of 2
Chad Crawford
 Chad Crawford
SSCarpal Tunnel
SSCarpal Tunnel (4.3K reputation)SSCarpal Tunnel (4.3K reputation)SSCarpal Tunnel (4.3K reputation)SSCarpal Tunnel (4.3K reputation)SSCarpal Tunnel (4.3K reputation)SSCarpal Tunnel (4.3K reputation)SSCarpal Tunnel (4.3K reputation)SSCarpal Tunnel (4.3K reputation)

Group: General Forum Members
Points: 4265 Visits: 18732
Hey Ronald - do you have a statistics background? I just noticed your sig line and it reminded me of an old statistician joke... Smile
john.arnott
john.arnott
Hall of Fame
Hall of Fame (3.5K reputation)Hall of Fame (3.5K reputation)Hall of Fame (3.5K reputation)Hall of Fame (3.5K reputation)Hall of Fame (3.5K reputation)Hall of Fame (3.5K reputation)Hall of Fame (3.5K reputation)Hall of Fame (3.5K reputation)

Group: General Forum Members
Points: 3510 Visits: 3059
Like Ronald, I doubt I'll have much use for a "text" datatype, but we do have XML in our databases so this QOD was valuable to me in pointing out that non-comparable datatypes are ignored. This script is modified from the original QOD to show the danger of depending on checksum or binary_checksum to flag certain changes.
Declare @FirstCksum int
CREATE TABLE #myTable (column1 xml,column2 int);
INSERT INTO #myTable VALUES ('',109);
select * from #mytable
SELECT @FirstCksum = BINARY_CHECKSUM(*) from #myTable;
update #myTable set column1='values' where column2 = 109
select * from #mytable
SELECT Case when BINARY_CHECKSUM(*) = @FirstCksum
then 'No Change'
else 'Table Modified'
end as TableChanged
from #myTable;
DROP TABLE #myTable

Yes, it returns "No Change" because only the int column is considered by the function.
Go


Permissions

You can't post new topics.
You can't post topic replies.
You can't post new polls.
You can't post replies to polls.
You can't edit your own topics.
You can't delete your own topics.
You can't edit other topics.
You can't delete other topics.
You can't edit your own posts.
You can't edit other posts.
You can't delete your own posts.
You can't delete other posts.
You can't post events.
You can't edit your own events.
You can't edit other events.
You can't delete your own events.
You can't delete other events.
You can't send private messages.
You can't send emails.
You can read topics.
You can't vote in polls.
You can't upload attachments.
You can download attachments.
You can't post HTML code.
You can't edit HTML code.
You can't post IFCode.
You can't post JavaScript.
You can post emoticons.
You can't post or upload images.

Select a forum

































































































































































SQLServerCentral


Search