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 |
|
juicyapple
Posting Yak Master
176 Posts |
Posted - 2008-09-25 : 04:53:50
|
| Hi,How to select all data from tableA where Rec_no and Test_no not in tableB, where Rec_no and Test_no are the primary key in tableA and foreign key in tableB.Thanks. |
|
|
visakh16
Very Important crosS Applying yaK Herder
52326 Posts |
Posted - 2008-09-25 : 05:00:24
|
| [code]SELECT a.*FROM TableA aLEFT JOIN TableB bON b.Rec_no =a.Rec_noAND b.Test_no=a.Test_noWHERE b.Rec_no IS NULLAND b.Test_no IS NULL[/code] |
 |
|
|
|
|
|