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 |
|
reado
Starting Member
2 Posts |
Posted - 2005-09-23 : 04:18:52
|
| Hi,I have a problem I have two tables, table1 my main table and table2 my secondary table.Table1 has lots of records with a field for a unique transaction number, table2 also has a field for a transaction number.Table 2 only has a 10 entries in with the same transaction number of 10 of the entries in table1.My question is how do I get all the records from table1 that DONT have a corrisponding transaction number in table2.ThanksPaul |
|
|
ditch
Master Smack Fu Yak Hacker
1466 Posts |
Posted - 2005-09-23 : 04:22:28
|
select a.*from table1 awhere not exists(select b.* from table2 b where a.id = b.id)something along those linesDuane. |
 |
|
|
reado
Starting Member
2 Posts |
Posted - 2005-09-23 : 04:27:01
|
| thank you thank you thank you thank you thank you thank youYou dont how long I have tried to get this working and you did it in one easy step.YOU ARE THE BEST!!!!!!! |
 |
|
|
|
|
|