I have two tables, Books and RelatedBooks , with identical field names, title and author
The RelatedBooks has records that related to the table Books, but not all Books have related books.
I want a list of all books from both the Books table and RelatedBooks table when I specify a criteria such as choosing the a specific subject.
Below is an emample of the SQL statement I'm using.
Select Books.title, Books.author, RelatedBooks.title, RelatedBooks.author
From Books LEFT OUTER JOIN RelatedBooks ON Books.booksID = RelatedBooks.relatedBooksID
WHERE Books.subject = "SQL"
The problem is that I'm only receiving books listed from the Books table and NOT the RelatedBooks table, and I'm receiving duplicate records from the Books table when in some situations I know I should only be receiving just one record.
Can anyone suggest what is wrong with the SQL statement?
I'm using Access 2000.
The RelatedBooks has records that related to the table Books, but not all Books have related books.
I want a list of all books from both the Books table and RelatedBooks table when I specify a criteria such as choosing the a specific subject.
Below is an emample of the SQL statement I'm using.
Select Books.title, Books.author, RelatedBooks.title, RelatedBooks.author
From Books LEFT OUTER JOIN RelatedBooks ON Books.booksID = RelatedBooks.relatedBooksID
WHERE Books.subject = "SQL"
The problem is that I'm only receiving books listed from the Books table and NOT the RelatedBooks table, and I'm receiving duplicate records from the Books table when in some situations I know I should only be receiving just one record.
Can anyone suggest what is wrong with the SQL statement?
I'm using Access 2000.