G
Guest
Please check out this line and let me know where I'm screwing up the syntax.
rst2.Open "Select * FROM tblSuspenseList", cnn, adOpenForwardOnly,
adLockOptimistic
rst2.Update [NotificationDate] = Date() WHERE
rst2.NotificationDate<Date()-7 Or rst2.NotificationDate Is Null and
Left(rst2.AcctStation,2) & rst2.Unit = RRUU AND rst2.CAP = "4-SA"
I'm trying to avoid running an update query following a procedure that
prepares an email report. Updating the NotificationDate indicates the
report has been sent so the function doesn't occur twice in a weeks period.
This SQL is supposed to update the NotificationDate field with the current
date if it is null, or if it contains a date that is greater than 7 days old
- IF the RRUU = the current RRUU (left two characters of accountstation +
Unit number) and CAP = "4-SA"
Thanks for any help, I've not done ANYTHING in SQL type script before.
rst2.Open "Select * FROM tblSuspenseList", cnn, adOpenForwardOnly,
adLockOptimistic
rst2.Update [NotificationDate] = Date() WHERE
rst2.NotificationDate<Date()-7 Or rst2.NotificationDate Is Null and
Left(rst2.AcctStation,2) & rst2.Unit = RRUU AND rst2.CAP = "4-SA"
I'm trying to avoid running an update query following a procedure that
prepares an email report. Updating the NotificationDate indicates the
report has been sent so the function doesn't occur twice in a weeks period.
This SQL is supposed to update the NotificationDate field with the current
date if it is null, or if it contains a date that is greater than 7 days old
- IF the RRUU = the current RRUU (left two characters of accountstation +
Unit number) and CAP = "4-SA"
Thanks for any help, I've not done ANYTHING in SQL type script before.