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 |
|
engcanada
Starting Member
39 Posts |
Posted - 2008-06-08 : 13:54:08
|
| Hi,Can someone please show me how to write the follwing sql statement. I need to obtain all records from tabel_1, column idregister that do not exist in table_2 matching the column idresume.Thank youSimon |
|
|
visakh16
Very Important crosS Applying yaK Herder
52326 Posts |
Posted - 2008-06-08 : 14:05:26
|
| [code]SELECT t1.*FROM table_1 t1LEFT table_2 t2ON t2.idresume=t1.idregisterWHERE t2.idresume IS NULL[/code] |
 |
|
|
engcanada
Starting Member
39 Posts |
Posted - 2008-06-08 : 14:27:43
|
| Thank you,This is what I used:SELECT t1.* FROM teacher t1 LEFT resume t2 ON t2.idresume=t1.idregister WHERE t2.idresume IS NULLand I receive the following error:Microsoft OLE DB Provider for SQL Server error '80040e14' 'resume' is not a recognized join option. |
 |
|
|
visakh16
Very Important crosS Applying yaK Herder
52326 Posts |
Posted - 2008-06-08 : 14:44:41
|
quote: Originally posted by engcanada Thank you,This is what I used:SELECT t1.* FROM teacher t1 LEFT JOIN resume t2 ON t2.idresume=t1.idregister WHERE t2.idresume IS NULLand I receive the following error:Microsoft OLE DB Provider for SQL Server error '80040e14' 'resume' is not a recognized join option.
sorry missed a JOIN clause there |
 |
|
|
engcanada
Starting Member
39 Posts |
Posted - 2008-06-08 : 14:46:13
|
| Hi,I use LEFT JOIN instead of LEFT and it worked:SELECT t1.* FROM teacher t1 LEFT JOIN resume t2 ON t2.idresume=t1.idregister WHERE t2.idresume IS NULLThanks again |
 |
|
|
|
|
|