Hi
I am trying to write a query that with display monthly income for a desired month. The problem is that it only shows the contracts that have started and ended in that month and not ongoing contract payments, that have either started in earlier months or have ended in later months.
Below is my current attempt.
Thanks in advance
SELECT Customer.CustomerNo, Customer.Forename, Customer.Surname, Contracts.ContractNo, Contracts.AddressOfWork, Contracts.MonthlyCost, Gardener.GardenerNo, Gardener.Forename, Gardener.Surname
FROM Customer, Gardener, Contracts
WHERE Customer.CustomerNo=Contracts.CustomerNo And Gardener.GardenerNo=Contracts.GardenerNo And Contracts.StartDate And Format([StartDate],"mm/yyyy")=[Enter Month/Year];