padlocked17
Registered User.
- Local time
- Today, 11:47
- Joined
- Aug 29, 2007
- Messages
- 276
I have a large query that I'm attempting to narrow down the results based on the SectionID and a IsNull.
I've got this in the Query criteria that shows me all of the records I want to exclude from the query. How do I include all of the other records and exclude these?
SQL
So basically what I want to do is:
I've got this in the Query criteria that shows me all of the records I want to exclude from the query. How do I include all of the other records and exclude these?
Code:
=6 And [Fixed_ACC_DT] Is Null
SQL
Code:
SELECT FixedARMS.Unit, FixedARMS.SSAN, FixedARMS.Name, FixedARMS.LAST4, FixedARMS.Flyer_Type, FixedARMS.CPOS, tblTasks.Task_ID, tblTasks.Description, tblTasks.SectionID, tblTaskSections.SectionName, tblTaskSections.SectionPageNum, tblTaskSections.SectionRemark, tblTasks.TaskLineNum, tblTasks.TaskRemarks, FixedARMS.N, FixedARMS.S, FixedARMS.Last_ACC_DT, FixedARMS.Fixed_ACC_DT, FixedARMS.ARMS_Due_DT, FixedARMS.GeneratedDue, FixedARMS.Accomplished, FixedARMS.Remaining, FixedARMS.Frequency, FixedARMS.Due_Date_Flag, FixedARMS.WAIVER_Due_DT, ITS_Current_Other.Physical_ACC, ITS_Current_Other.Physical_Due, ITS_Current_Other.Physical_Avail, ITS_Current_Other.Physio_ACC, ITS_Current_Other.Physio_Due, ITS_Current_Other.RecordsReview_ACC, ITS_Current_Other.RecordsReview_Due, ITS_Current_Other.DNIF, TotalFlyTime.PrimMDS, TotalFlyTime.Total, TotalFlyTime.PrimAcft, [306090].[30], [306090].[60], [306090].[90], FixedARMS.SemiAnnual_REQ, FixedARMS.[1SemiAnnual_ACC], FixedARMS.[2SemiAnnual_ACC]
FROM ITS_Current_Other RIGHT JOIN (TotalFlyTime RIGHT JOIN (306090 RIGHT JOIN ((FixedARMS INNER JOIN tblTasks ON FixedARMS.Task_ID = tblTasks.Task_ID) LEFT JOIN tblTaskSections ON tblTasks.SectionID = tblTaskSections.SectionID) ON [306090].SSAN = FixedARMS.SSAN) ON TotalFlyTime.SSAN = FixedARMS.SSAN) ON ITS_Current_Other.SSAN = FixedARMS.SSAN
WHERE (((FixedARMS.SSAN)=xxxxxxxxx) AND ((tblTasks.SectionID)<>2) AND ((tblTasks.SectionID)=6 And [Fixed_ACC_DT] Is Null));
So basically what I want to do is:
Code:
IIf([SectionID]=6 And IsNull([Fixed_ACC_DT]),"EXCLUDE","DO NOTHING")
Last edited: