In article <1d584d94-8944-437d-b6f0-6bfd4e2407f6 (AT) r20g2000yqd (DOT) googlegroups.com>, bruce <bruceaj (AT) bellsouth (DOT) net> wrote:
Quote:
I guess it's my inexperience but I cannot figure out how to write SQL
for the following case:
I have two tables. Table1 has the numbers 1 through 100 (no
duplicates). The Table2 has "Some" of the numbers 1 through 100 and
there may be duplicates in Table2. I would like to SELECT a list of
the numbers missing from Table2.
And to carry it one step further. I want to use the numbers missing
from Table2 to SELECT the rows from TABLE 1 with these numbers. This
is the final result. |
SELECT Table1.Number, Table1.OtherColumns
FROM Table1 LEFT JOIN Table2 ON (Table1.Number = Table2.Number)
WHERE Table2.Number IS NULL
;