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.
| Author |
Topic |
|
Babli
Yak Posting Veteran
53 Posts |
Posted - 2007-02-16 : 00:44:35
|
| Hi,I have two tables with the same set of columns I need to compare the rows among the 2 tables.How do i do that.Thanks,Babli |
|
|
khtan
In (Som, Ni, Yak)
17689 Posts |
Posted - 2007-02-16 : 00:57:53
|
something like thisselect *from table1 t1 inner join table2 t2on t1.pkcol = t2.pkcolwhere t1.col1 <> t2.col1or t2.col2 <> t2.col2. . . KH |
 |
|
|
khtan
In (Som, Ni, Yak)
17689 Posts |
Posted - 2007-02-16 : 00:58:40
|
or use LEFT / RIGHT / FULL OUTER JOIN if you have mismatched rows in the tables KH |
 |
|
|
harsh_athalye
Master Smack Fu Yak Hacker
5581 Posts |
Posted - 2007-02-16 : 01:14:21
|
| [url]http://weblogs.sqlteam.com/jeffs/archive/2004/11/10/2737.aspx[/url]Harsh AthalyeIndia."The IMPOSSIBLE is often UNTRIED" |
 |
|
|
|
|
|