Forum Discussion
IF Statement as filtering criteria
SQL below:
SELECT EPIC_SHD_FOLLOW_UP_HISTORY.WORKQUEUE_ID, Last(EPIC_SHD_FOLLOW_UP.WORKQUEUE_ENTRY_DATE) AS LastOfWORKQUEUE_ENTRY_DATE, EPIC_SHD_FOLLOW_UP.INVOICE_NUM, Sum(EPIC_SHD_FOLLOW_UP.OUTSTANDING_AMT) AS SumOfOUTSTANDING_AMT
FROM [31109 Epic Work Queues] INNER JOIN (EPIC_SHD_FOLLOW_UP_HISTORY INNER JOIN EPIC_SHD_FOLLOW_UP ON EPIC_SHD_FOLLOW_UP_HISTORY.FOLLOW_UP_ID = EPIC_SHD_FOLLOW_UP.FOLLOW_UP_ID) ON [31109 Epic Work Queues].[WQ ID] = EPIC_SHD_FOLLOW_UP_HISTORY.WORKQUEUE_ID
GROUP BY EPIC_SHD_FOLLOW_UP_HISTORY.WORKQUEUE_ID, EPIC_SHD_FOLLOW_UP.INVOICE_NUM
HAVING (((Sum(EPIC_SHD_FOLLOW_UP.OUTSTANDING_AMT))>0));
Anybody have any insight here?
Thanks
Joe
- George HepworthApr 10, 2020Steel Contributor
JoeCavasin Sorry, I missed your followup.
It's impossible to guess (and I do mean guess) what needs to be done at this level of generality. For example, your question refers to "Ranks", but here is nothing about ranking in this SQL. Where and how would that be done?
I apologize, but this is not really going to be resolvable, in my opinion, without a deeper look at actual data and explication of the business rules behind the criteria.
Can you provide a sample accdb for better analysis? Remove any confidential data and provide sufficient data and queries to see what is involved.