I have a Query that SELECTS records based on a Percent. If the percent is Greater Than 40% then SELECT the record.
Now this criteria is changing to SELECT Records after 08/31/2012 that are Greater Than 30%. I need to continue to SELECT Records with Greater Than 40% prior to 08/31/2012 and then using the new criteria of 30% SELECT Records after 09/1/2012.
I have created a field titled {Action_Period] which assigns either a 4 for dates less than or equal to 08/31/2012 and a 5 to dates greater than 09/01/2012.
HOw can I set my Percent field to this selection criteria?
I tried the following WHERE Statement, but it is only returning records for period equal to 5. It is pulling the correct percents but is not showing me any records for period 4.
My complete QUERY SQL is
Any help or guidance on this code would be greatly appreciated.
Now this criteria is changing to SELECT Records after 08/31/2012 that are Greater Than 30%. I need to continue to SELECT Records with Greater Than 40% prior to 08/31/2012 and then using the new criteria of 30% SELECT Records after 09/1/2012.
I have created a field titled {Action_Period] which assigns either a 4 for dates less than or equal to 08/31/2012 and a 5 to dates greater than 09/01/2012.
HOw can I set my Percent field to this selection criteria?
I tried the following WHERE Statement, but it is only returning records for period equal to 5. It is pulling the correct percents but is not showing me any records for period 4.
Code:
WHERE (((HEALTH_DOCA_SUMMARY_OF_CASES.Percent)>=0.395 And [Action_Period]<4)) OR (((HEALTH_DOCA_SUMMARY_OF_CASES.Percent)>=0.295 And [Action_Period]=5))
My complete QUERY SQL is
Code:
.Audit_Type AS Fup_audit, HEALTH_DOCA_AUDIT_REVIEWS.FUPAudit_Status, [Follow-Up Audits].Audit_MonthYear, [Follow-Up Audits].Action_Type AS [Follow-Up_Result], [Follow-Up Audits].Fup_close_audit, HEALTH_DOCA_ACTION_TYPES.Action_Type, CASEM_MA_ACTIVITIES.ACTIVITY_NAME, CASEM_MA_TRANSACTIONS.ACTIVITY_DATE, CASEM_MA_TRANSACTIONS.COMMENTS, HEALTH_DOCA_SUMMARY_OF_CASES.PERCENT, HEALTH_DOCA_SUMMARY_OF_CASES.ACTION_PERIOD INTO [tbl_temp_failed E and M audits]]
Any help or guidance on this code would be greatly appreciated.