![]() | |
![]() |
| | Thread Tools | Display Modes |
#1
| |||
| |||
|
#2
| |||
| |||
|
|
Really not sure how to do this.. but I suspect a sub select is needed I have 2 tables, both have a column labeled ID , I need to delete the row in tableONE whenever a matching ID was NOT found in tableTWO *.. Sounds simple.. and probably is, I'm just not finding the right incantation. |
#3
| |||
| |||
|
#4
| |||
| |||
|
|
SELECT tableONE.ID, tableTWO.ID FROM tableONE LEFT JOIN tableTWO ON tableONE.ID = tableTWO.ID WHERE tableTWO.ID IS NULL |
#5
| |||
| |||
|
|
Thanks for the cluestick .. Here is what I came up with *. . . *testing as a select first, just to be safe select tableONE.ID , *tableTWO.ID FROM *tableONE LEFT JOIN *tableTWO ON tableONE.ID *= *tableTWO.ID WHERE tableTWO.ID IS NULL The query appears to work as intended, but currently finds no matches, which is an unexpected result. *I would of thought there would be at least a few matches, so I'd apreciate if you could let me know if the query above looks correct to you.. or do you need a bigger cluestick :P |
![]() |
| Thread Tools | |
| Display Modes | |
| |