July 11, 2003 at 2:10 pm
Guys,
We are currently running SQL 7.0. The issue i have is, we have two identical tables A and B. They are identical in structure. However, table A has 13 records more than table B. How do i identify the extra rows in table A from table B if all the column names between the two are the same? My problem is, none of them have primary or secondary keys in them. Let me know.
July 13, 2003 at 2:47 am
I think this topic is answered already in another thread.
However please use this script and run
http://www.sqlservercentral.com/scripts/contributions/458.asp
After storing the script from query analyser run
sp_Compare2Tables Table1, Table2
If you are using 2part, 3part or 4 part names (dbo.table1, database1.dbo.table1 or server.database1.dbo.table1)
use them with in quotations.
G.R. Preethiviraj Kulasingham
Chief Technology Officer.
Softlogic Information Systems Limited,
14 De Fonseka Place,
Colombo 05.
Sri Lanka.
Cheers,
Prithiviraj Kulasingham
http://preethiviraj.blogspot.com/
July 14, 2003 at 12:25 pm
Hi,
Thanks for the response. However, the sp_compare2tables stored procedure did not work. I have found a solution by intersecting the two tables to find the difference. Issue solved.
Viewing 3 posts - 1 through 2 (of 2 total)
You must be logged in to reply to this topic. Login to reply