Plateforme Level Extreme
Abonnement
Profil corporatif
Produits & Services
Support
Légal
English
Comparing the values in 2 tables
Message
 
 
À
02/04/2009 11:56:19
Information générale
Forum:
Microsoft SQL Server
Catégorie:
Syntaxe SQL
Versions des environnements
SQL Server:
SQL Server 2005
Divers
Thread ID:
01392746
Message ID:
01392758
Vues:
53
This message has been marked as a message which has helped to the initial question of the thread.
You can use CHECKSUM() or BINARY_CHECKSUM() function.
SELECT *
	FROM tbl1
	JOIN tbl2 ON tbl1.pk = tbl2.pk
		AND CHECKSUM(tbl1.col2, tbl1.col3) <> CHECKSUM(tbl2.col2, tbl2.col3)
Check also http://decipherinfosys.wordpress.com/2009/02/11/another-use-of-the-checksum-functions/

>
>How's it going? Yep, I want to compare all data, every column, every row. There is a primary key. I have rewritten a process that inputs 10 of thousands of records every night. So I want to compare the data in the new process to the old one. I have it written in Foxpro, where I scan, seek every record and compare the value in every field. It works fine, but I was just wondering if SQL Server had some niffty comand or tool.
>BTW, I had a problem with the LEN command the other day and looked it up here on the thread, and you stated to some one to use DataLength instead.. thanks!
>
>Thanks!
--sb--
Précédent
Répondre
Fil
Voir

Click here to load this message in the networking platform