By using this site, you agree to our updated Privacy Policy and our Terms of Use. Manage your Cookies Settings.
438,266 Members | 1,312 Online
Bytes IT Community
+ Ask a Question
Need help? Post your question and get tips & solutions from a community of 438,266 IT Pros & Developers. It's quick & easy.

How do I write a point-in-time record to another table?

P: n/a
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!

Jul 23 '05 #1
Share this Question
Share on Google+
1 Reply


P: n/a
(sa*******@yahoo.com) writes:
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?


Yes, an Agent job that is set up to run at 23:59:59 at the last day
of the month is something you easily can set up from Enterprise Manager.

--
Erland Sommarskog, SQL Server MVP, es****@sommarskog.se

Books Online for SQL Server SP3 at
http://www.microsoft.com/sql/techinf...2000/books.asp
Jul 23 '05 #2

This discussion thread is closed

Replies have been disabled for this discussion.