Compare Data in two tables | SQL Server Performance Forums

SQL Server Performance Forum – Threads Archive

Compare Data in two tables

I am handling a batch job which does an export of data from one database to another by calling various stored procedures. I’ve made some changes in the queries used for export. Now I need to comapre if the results of the change in the query do not change the data that has been imported into destination. I was thinking of using a left outer and a right outer join on all the columns of tables to see if there is any change in the data but i have been limited by the fact that there are some 70 tables that need to be compared and also SQL Server 6.5 is in use which does not allow my dynamic query to go beyond 255 characters. Other option that i could think of was to select the relavant data into temporary tables and then bcp out the same to text files which can be compared using windiff or DOS Based COMP utility. Can anyone advice on the same please…. Gaurav
Would Viktor Gorodnichenko’s stored procedure work? –Jonathan
I shall look into the same. Thaks for the info…. Gaurav
My problem still remains the same. The SQL Server under consideration is SQL Server 6.5 which does not support varchar(8000) used in the query. Gaurav