Wrox Programmer Forums
Go Back   Wrox Programmer Forums > SQL Server > SQL Server 2000 > SQL Server 2000
|
SQL Server 2000 General discussion of Microsoft SQL Server -- for topics that don't fit in one of the more specific SQL Server forums. version 2000 only. There's a new forum for SQL Server 2005.
Welcome to the p2p.wrox.com Forums.

You are currently viewing the SQL Server 2000 section of the Wrox Programmer to Programmer discussions. This is a community of software programmers and website developers including Wrox book authors and readers. New member registration was closed in 2019. New posts were shut off and the site was archived into this static format as of October 1, 2020. If you require technical support for a Wrox book please contact http://hub.wiley.com
 
Old July 6th, 2006, 06:51 AM
Authorized User
 
Join Date: Nov 2005
Posts: 44
Thanks: 0
Thanked 0 Times in 0 Posts
Send a message via MSN to joxa83 Send a message via Yahoo to joxa83
Default CHECK_SUM returns same value for diff. inputs

I was performing some case sensitive comparsions and as one of options was to use check sum, anyway I conluded that CHECK_SUM and BINARY_CHECK sum functions return same value for different inputs.As far as I know those functions are like hash functions and CHECKSUM applied over any two lists of expressions returns the same value if the corresponding elements of the two lists have the same type and are equal when compared using the equals operator.
SELECT BINARY_CHECKSUM('A') AS [Checksum value for 'A'],
    BINARY_CHECKSUM('AAAAAAAAAAAAAAAAA') AS [Checksum value for 'AAAAAAAAAAAAAAAAA']
SELECT CHECKSUM('AB') AS [Checksum value for 'A'],
    CHECKSUM('ABABABABABABABABABABABABABABABABAB') AS [Checksum value for 'ABABABABABABABABABABABABABABABABAB']
It seems that if put 17 times first expression as second expression result will be same.Do I misunderstand those functions or this is a BUG?

 
Old July 6th, 2006, 07:08 AM
Authorized User
 
Join Date: Nov 2005
Posts: 44
Thanks: 0
Thanked 0 Times in 0 Posts
Send a message via MSN to joxa83 Send a message via Yahoo to joxa83
Default

I GET this IN SQL SERVERF HELP
For example, the BINARY_CHECKSUM values for the strings "McCavity" and "Mccavity" are different. In contrast, in a case-insensitive server, CHECKSUM returns the same checksum values for those strings. CHECKSUM values should not be compared against BINARY_CHECKSUM values.Nothing else





Similar Threads
Thread Thread Starter Forum Replies Last Post
1 form for multiple inputs Vince_421 Access VBA 2 February 6th, 2007 04:06 AM
FLASH User Inputs IP076 Flash (all versions) 1 January 5th, 2007 12:23 AM
command line inputs for xsl rameshnarayan XSLT 3 August 4th, 2005 05:10 AM
Passing Query Inputs To Reports socoolbrewster Access 4 February 25th, 2005 12:59 PM
Multiple inputs on same page kev_79 Access 3 July 8th, 2003 11:16 PM





Powered by vBulletin®
Copyright ©2000 - 2020, Jelsoft Enterprises Ltd.
Copyright (c) 2020 John Wiley & Sons, Inc.