wackywoo105
Registered User.
- Local time
- Today, 01:44
- Joined
- Mar 14, 2014
- Messages
- 203
I have the following SQL generate a query.
What I want to add is something like:
Where the 2 condition have to be met just for this one. However, I can’t get this to be an exclusive statement so the SMS bit ends up applying to all the other parts.
Code:
SELECT *
FROM RecallLetters
WHERE (((RecallLetters.[Due Date]) Like "*/*/2017" Or (RecallLetters.[Due Date]) Like "*/*/2016" Or (RecallLetters.[Due Date]) Like "*/*/2015") AND ((RecallLetters.PartAdd) In (SELECT [PartAdd] FROM [RecallLetters] As Tmp GROUP BY [PartAdd] HAVING Count(*)>1 )))
ORDER BY RecallLetters.[Due Date];
What I want to add is something like:
Code:
OR (RecallLetters.[Due Date]) Like "*/05/2017") AND ((RecallLetters.SMS)=False))
Where the 2 condition have to be met just for this one. However, I can’t get this to be an exclusive statement so the SMS bit ends up applying to all the other parts.