Hello,
I have two tables with the same fields:
mytable1.bookno mytable2.bookno
mytable1.pageno mytable2.pageno
I would like to find the bookno & pageno from mytable1 where they do not exist in mytable2. The bookno/pageno together.
For example, Book 74 page 105. Book 74 will exist in both tables. Page 105 will also exist in both tables (from different books). But I want to find out that book 74 page 105 is in mytable1 but not in mytable2.
Something like this:
But this is just my juvenile attempt.
I also ran:
So I can see all of the NULL entries for mytable2. I just cant figure out how to get ONLY the null entries, or, just those items in mytable1 that don't exist in mytable2
I have two tables with the same fields:
mytable1.bookno mytable2.bookno
mytable1.pageno mytable2.pageno
I would like to find the bookno & pageno from mytable1 where they do not exist in mytable2. The bookno/pageno together.
For example, Book 74 page 105. Book 74 will exist in both tables. Page 105 will also exist in both tables (from different books). But I want to find out that book 74 page 105 is in mytable1 but not in mytable2.
Something like this:
Code:
select bookno, pageno from mytable1
where bookno, pageno not in (select sbookno, spageno from mytable2)
But this is just my juvenile attempt.
I also ran:
Code:
select mytable.bookno, mytable.pageno, mytable.bookno, mytale.pageno
from mytable
join mytable2 on (mytable1.bookno = mytable1.pageno and mytable2.bookno = mytable2.pageno)
order by mytable2.booktype, mytable2.bookno, mytable2.pageno
So I can see all of the NULL entries for mytable2. I just cant figure out how to get ONLY the null entries, or, just those items in mytable1 that don't exist in mytable2