Please start any new threads on our new site at https://forums.sqlteam.com. We've got lots of great SQL Server experts to answer whatever question you can come up with.

 All Forums
 SQL Server 2008 Forums
 Transact-SQL (2008)
 Match Records between 2 tables

Author  Topic 

juicyapple
Posting Yak Master

176 Posts

Posted - 2011-03-08 : 20:18:03
Hi,

Anyway to validate tableA and tableB have same number of rows and content?


Select * From tableA
Record_No Detail_Id Detail1 Detail2 Detail3
--------- --------- ------- ------- -------
1 1 X1 M A
1 2 X1 M B
1 3 X2 N A
1 4 X2 N B
1 5 X3 O A
1 6 X3 O B

Select * From tableB
Record_No Detail_Id Detail1 Detail2 Detail3
--------- --------- ------- ------- -------
1 1 X1 M A
1 2 X1 M B
1 3 X2 N A
1 4 X2 N B
1 5 X3 O A
1 6 X3 O B
1 7 X4 P A
1 8 X4 P B

tkizer
Almighty SQL Goddess

38200 Posts

Posted - 2011-03-08 : 20:30:46
Yes, here you go: http://weblogs.sqlteam.com/jeffs/archive/2004/11/10/2737.aspx

Tara Kizer
Microsoft MVP for Windows Server System - SQL Server
http://weblogs.sqlteam.com/tarad/

Subscribe to my blog
Go to Top of Page

juicyapple
Posting Yak Master

176 Posts

Posted - 2011-03-08 : 21:10:06
quote:
Originally posted by tkizer

Yes, here you go: http://weblogs.sqlteam.com/jeffs/archive/2004/11/10/2737.aspx

Tara Kizer
Microsoft MVP for Windows Server System - SQL Server
http://weblogs.sqlteam.com/tarad/

Subscribe to my blog



Thanks. The link is useful.
Go to Top of Page

tkizer
Almighty SQL Goddess

38200 Posts

Posted - 2011-03-08 : 21:15:47
You're welcome, glad to help.

Tara Kizer
Microsoft MVP for Windows Server System - SQL Server
http://weblogs.sqlteam.com/tarad/

Subscribe to my blog
Go to Top of Page
   

- Advertisement -