Checksum not working as expected


  select  hd.[department number],hr.[department number]  , 'histdnchk' = checksum( hd.[department number] )  , 'prsdnchk' = checksum(hr.[department number] )  from targettable hd   join sourceview hr  on hd.pid = hr.pid  
  query above returns differing checksums for 2 columns of interest. problem is, hr used to populate hd minutes before.  
  column values identical. both source and target char(4), checksum is still different!? can explain this?  
  <span style="font-family:courier new; font-size:x-small"><span style="font-family:courier new; font-size:x-small"> </span></span>  

try :

  select   top (200) col1, col2, id, checksum(col1) as checksum1, checksum(col2 collate sql_latin1_general_cp1_ci_as) as checksum2 from  codepagetest  

best regards


SQL Server  >  Transact-SQL



Comments

Popular posts from this blog

Motherboard replacement

Cannot create Full Text Search catalog after upgrading to V12 - Database is not fully started up or it is not in an ONLINE state

Remote Desktop App - Error 0x207 or 0x607