I am trying to select all the records in a table that DO NOT have a matching record in a second table. I hope this makes sense. Here is my query:
SELECT * FROM table1 WHERE table1.ID NOT IN(SELECT ID FROM table2);
Does anyone see what I might be doing wrong or have a better way of doing this...
I am having trouble returning the correct records. My database structure is as follows:
TABLE1
ID
TABLE2
MEMBER_ID
START_YEAR
END_YEAR
START_YEAR and END_YEAR are stored in TABLE2 as a number, not an actual year.
Two numbers are static 36 and 55. I need to select any records that have a...
This site uses cookies to help personalise content, tailor your experience and to keep you logged in if you register.
By continuing to use this site, you are consenting to our use of cookies.