I'm writing a classic ASP application that records all logging of user
logins on our support site. The logging is a rolling window of how many
people have logged in for a given month, i.e. tracked by a 'lastlogin'
field so the tracking is done in a date range. So, for the month of
January I would record lastlogin dates between January 1 and January
31. My question is this...on the last day of the month (example being
Janauary)at 23:59:59PM I want to write the total number of users that
had a lastlogin date within the month of January and write that total
number to another table so I have a point-in-time figure for January
logins and how many users logged in in the month of January. How do I
do that? How can I have the sql server dynamically check the last day
of each month at 23:59:59PM and then run that query to obtain the total
numbers users that logged in and then record that value to another
table?? Do I use a SQL Job to do that?
Any help would be greatly appreciated! Thanks!
logins on our support site. The logging is a rolling window of how many
people have logged in for a given month, i.e. tracked by a 'lastlogin'
field so the tracking is done in a date range. So, for the month of
January I would record lastlogin dates between January 1 and January
31. My question is this...on the last day of the month (example being
Janauary)at 23:59:59PM I want to write the total number of users that
had a lastlogin date within the month of January and write that total
number to another table so I have a point-in-time figure for January
logins and how many users logged in in the month of January. How do I
do that? How can I have the sql server dynamically check the last day
of each month at 23:59:59PM and then run that query to obtain the total
numbers users that logged in and then record that value to another
table?? Do I use a SQL Job to do that?
Any help would be greatly appreciated! Thanks!
Comment