Click here to monitor SSC
SQLServerCentral is supported by Red Gate Software Ltd.
 
Log in  ::  Register  ::  Not logged in
 
 
 
        
Home       Members    Calendar    Who's On


Add to briefcase ««12

Incremental load using Hashvalue Expand / Collapse
Author
Message
Posted Wednesday, January 29, 2014 4:09 PM


SSCertifiable

SSCertifiableSSCertifiableSSCertifiableSSCertifiableSSCertifiableSSCertifiableSSCertifiableSSCertifiableSSCertifiable

Group: General Forum Members
Last Login: Today @ 12:59 AM
Points: 6,256, Visits: 7,437
sneumersky (1/29/2014)
HASHBYTES is the best for determining total and complete uniqueness if you are willing to deal with the overhead.


From MSDN:

Return Value
--------------------------------------------------------------------------------
varbinary (maximum 8000 bytes)


If I'm going to possibly compare 8000 bytes I'm usually better off just doing the column compare, thus why I rarely use HASHBYTES.



- Craig Farrell

Never stop learning, even if it hurts. Ego bruises are practically mandatory as you learn unless you've never risked enough to make a mistake.

For better assistance in answering your questions | Forum Netiquette
For index/tuning help, follow these directions. |Tally Tables

Twitter: @AnyWayDBA
Post #1536127
Posted Thursday, January 30, 2014 9:38 AM
SSCrazy

SSCrazySSCrazySSCrazySSCrazySSCrazySSCrazySSCrazySSCrazy

Group: General Forum Members
Last Login: Monday, July 28, 2014 7:12 PM
Points: 2,148, Visits: 487
I've never had HASHBYTES return more than 14 bytes.
Post #1536424
« Prev Topic | Next Topic »

Add to briefcase ««12

Permissions Expand / Collapse