CinCoder
12-09-2004, 06:12 PM
I have a question on a task I'm working on and hope someone can provide a little help.
I have an ASP application with an Access DB backend. When the user logins into the site, I authenticate them and then do one of two things.
I update the number of Accesses to the site for the user and set the Last Access Date to current date in short format
or
if the Last Access Date is not in the current month, I insert a new record setting the Accesses count to one and adding a Last Access Date of current
The issue is that I don't know how to write the SQL to compare the current date month to the last access date month in the DB for the user and then update or insert based on the compare.
I have an ASP application with an Access DB backend. When the user logins into the site, I authenticate them and then do one of two things.
I update the number of Accesses to the site for the user and set the Last Access Date to current date in short format
or
if the Last Access Date is not in the current month, I insert a new record setting the Accesses count to one and adding a Last Access Date of current
The issue is that I don't know how to write the SQL to compare the current date month to the last access date month in the DB for the user and then update or insert based on the compare.