query question

G

golan

hi, i have 2 tables contract and payment under payment i have field
pay_for(date).
i want to see all contracts that dont pay for example 10/08.
 
J

John W. Vinson

hi, i have 2 tables contract and payment under payment i have field
pay_for(date).
i want to see all contracts that dont pay for example 10/08.

a NOT EXISTS query will do this:

SELECT Contract.*
FROM CONTRACT
WHERE NOT EXISTS
(SELECT ContractNo FROM Payment
WHERE Payment.ContractNo = Contract.ContractNo
AND Payment.Pay_for BETWEEN #10/1/08# AND #10/31/08#)
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Similar Threads


Top