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 |
|
Andraax
Aged Yak Warrior
790 Posts |
Posted - 2001-08-09 : 05:47:54
|
| Hi!Let's say I have 2 tables, looking like this:table1:id1 id21 11 21 32 1table2:id1 id21 11 21 32 12 2What I want to do is to compare the tables and fetch rows from table2 which doesn't exist in table1. How can I compare both the fields at the same time? The only way I have come up with is this:select * from table2where convert(varchar, id1)+convert(varchar, id2) not in (select convert(varchar, id1)+convert(varchar, id2) from table1)Is there a better way to do it? |
|
|
|
|
|