springwood01
Technical User
This should be easy, but I'm looking for advise on quickest/easiest way to get results I need. Initial query with SQL is below. I have a criteria of A or B in CatID field. This gives me a record of all persons who have a no for either the A or B category. I need to generate 3 reports from my query/s:
1. FullNames that have no for both A & B id's.
2. FullNames that have a no for A but not listed in #1 report.
3. FullNames that have a no for B but not listed in #1 report.
Tried Criteria A AND B to get report#1 and did not work. Tried several other things to get the 3 results I need but just can't get there. Looked at an IIF statement but unable to determine the format for that which works. Any suggestions would be helpful.
SELECT AutoCamNo.FullName, AutoCamNo.ActiveContractNum, AutoCamNo.LastOfCompliant, AutoCamNo.CatID, AutoCamNo.CatName
FROM AutoCamNo
GROUP BY AutoCamNo.FullName, AutoCamNo.ActiveContractNum, AutoCamNo.LastOfCompliant, AutoCamNo.CatID, AutoCamNo.CatName;
1. FullNames that have no for both A & B id's.
2. FullNames that have a no for A but not listed in #1 report.
3. FullNames that have a no for B but not listed in #1 report.
Tried Criteria A AND B to get report#1 and did not work. Tried several other things to get the 3 results I need but just can't get there. Looked at an IIF statement but unable to determine the format for that which works. Any suggestions would be helpful.
SELECT AutoCamNo.FullName, AutoCamNo.ActiveContractNum, AutoCamNo.LastOfCompliant, AutoCamNo.CatID, AutoCamNo.CatName
FROM AutoCamNo
GROUP BY AutoCamNo.FullName, AutoCamNo.ActiveContractNum, AutoCamNo.LastOfCompliant, AutoCamNo.CatID, AutoCamNo.CatName;