I am trying to send emails to all the addresses in a database that fit a certain description. My query will look something like this:
SELECT EmailAddress
FROM Customers`
WHERE EmailFlag = 'true'`
AND (Today'sDate - DateOfVisit) >= 90;
Not sure how I would do Today's Date - DateOfVisit, maybe you can help with this too?
My real question is how to take the results of this query pop one email address off of the top, use it to send an email, set it's flag to false, run the query again repeat until the query returns null.
Thanks in advance for your help!
See Question&Answers more detail:
os 与恶龙缠斗过久,自身亦成为恶龙;凝视深渊过久,深渊将回以凝视…