book in it, and the isbn, and the other that has the book title,
inventory data, prices, the isbn.
Because of some techncal constraints I won't get into now, I can't
combine them both into one table. No problem. Things are going fine as
long as there is a description in the one table to corrispond to the
isbn and other data in the other table.
However, about half of the products are not yet entered into the
descrition table. I'd like to run a sql query that pulls up all the
isbns that don't exist in the other. In other words, I'd like to get a
query that tells me exactly which isbns do not yet have descrition data
in them. I know there is some sql that says to search from one file
where the number does not exist in the other, but it slips my mind. Can
someone help me on this please?
Thank you!
Bill
*** Sent via Developersdex http://www.developersdex.com ***
Don't just participate in USENET...get rewarded for it!Bill,
You can use one of these queries:
select *
from Titles
where not exists(select * from Descriptions where Descriptions.isbn =
Titles.isbn)
OR
select *
from Titles
where isbn not in (select isbn from Descriptions)
OR
select Titles.*
from Titles left outer join Descriptions on Descriptions.isbn =
Titles.isbn
where Descriptions.isbn is null
Shervin
"Bill" <BillZimmerman@.gospellight.com> wrote in message
news:3f8c7948$0$200$75868355@.news.frii.net...
> I have two tables of book information. One that has descriptions of the
> book in it, and the isbn, and the other that has the book title,
> inventory data, prices, the isbn.
> Because of some techncal constraints I won't get into now, I can't
> combine them both into one table. No problem. Things are going fine as
> long as there is a description in the one table to corrispond to the
> isbn and other data in the other table.
> However, about half of the products are not yet entered into the
> descrition table. I'd like to run a sql query that pulls up all the
> isbns that don't exist in the other. In other words, I'd like to get a
> query that tells me exactly which isbns do not yet have descrition data
> in them. I know there is some sql that says to search from one file
> where the number does not exist in the other, but it slips my mind. Can
> someone help me on this please?
> Thank you!
>
> Bill
> *** Sent via Developersdex http://www.developersdex.com ***
> Don't just participate in USENET...get rewarded for it!|||Dear Shervin:
Thank you! It worked like a charm.
All the best,
Bill
*** Sent via Developersdex http://www.developersdex.com ***
Don't just participate in USENET...get rewarded for it!sqlsql
No comments:
Post a Comment