I have an MS Access 2000 table. It contains an ID Number, Year and Amount.
I would like to select ONLY those ID Numbers where the Year = 2006 and the amount > 0
AND
where the year = 2007 and the amount = 0.
Example:
ID Number 1
Year 2006 2006 amount $10.00
Year 2007 2007 amount = 0
Select this one
ID Number 2
Year 2006 2006 amount = $5.00
Year 2007 2007 amount = $5.00
DON’T SELECT THIS ONE!
I tried this query and it does NOT WORK
SELECT CONTRIBS.ID, CONTRIBS.Year, CONTRIBS.AMOUNT
FROM CONTRIBS
WHERE( (((CONTRIBS.Year)=”2006″)) AND (((CONTRIBS.AMOUNT)>0)) and (((CONTRIBS.Year)=”2007″) AND ((CONTRIBS.AMOUNT)=0)))
ORDER BY CONTRIBS.ID;
Any help you can offer would be greatly appreciated…
Thanks,
Alan