May 10, 2016 at 2:07 am
Try this:
WHERE
Code NOT IN ('GST','TAX', 'COMM')
AND NOT (Ty IN ('A','C') AND [Cr Ind] = 'C'))
For fast, accurate and documented assistance in answering your questions, please read this article.
Understanding and using APPLY, (I) and (II) Paul White
Hidden RBAR: Triangular Joins / The "Numbers" or "Tally" Table: What it is and how it replaces a loop Jeff Moden
May 10, 2016 at 2:19 pm
SELECT [Emp Number], SUM(Amount) FROM [" & PayrollSheetName & "$] " & _
" WHERE Code NOT IN ('GST','TAX', 'COMM') AND Ty NOT IN ('A','C') AND [Cr Ind] = 'C')
" GROUP BY [Emp Number] "
will try this.
May 10, 2016 at 7:45 pm
Thankyou Chris, that was giving me a headache.
Thanks Brian
You are never an expert, you are always learning!Viewing 3 posts - 1 through 4 (of 4 total)
You must be logged in to reply to this topic. Login to reply