June 8, 2007 at 1:27 pm
I need to create a running count of LOGINS based upon the Year, Month, Day and Hour. If there are no logins for particular Hour, I still want to display the respective date, just with a zero value for logins.
What is the most efficient way to do this?
EXAMPLE:
2007 | 01 | 01 | 12:00 | 5 Logins
2007 | 01 | 01 | 1:00 | 0 Logins
2007 | 01 | 01 | 2:00 | 10 Logins
My dates currently are based upon the Date of the Login so that obviously will not work since only rows 1 and 3 from above will be returned in my result set.
As always, I appreciate any help!
June 8, 2007 at 1:38 pm
June 8, 2007 at 1:38 pm
You may want a Calendar table in your database. Do a search of thetopics and articles on this site, and I am sure you will find something to help you.
June 8, 2007 at 2:01 pm
Got it. I'll run through it. Thanks!
June 8, 2007 at 2:15 pm
June 8, 2007 at 2:21 pm
Okay, now that was funny.
June 8, 2007 at 2:57 pm
Yes, that was a true act of wit!
June 8, 2007 at 7:00 pm
mrpolecat wins a piece of PIE for that one.....
______________________________________________________________________
Personal Motto: Why push the envelope when you can just open it?
If you follow the direction given HERE[/url] you'll likely increase the number and quality of responses you get to your question.
Jason L. SelburgJune 11, 2007 at 7:00 am
And I bet is had nothing to do with 2/3
Far away is close at hand in the images of elsewhere.
Anon.
June 13, 2007 at 4:30 am
Hi,
Did u get the query, if so can you please give the same to me . i also need this.
thanks in advance.
regards,
Hari.
June 13, 2007 at 11:21 am
No... no query... the recommendation was to use a "Calendar Table"... there are many to choose from if you search this site.
--Jeff Moden
Change is inevitable... Change for the better is not.
June 13, 2007 at 11:25 am
Viewing 12 posts - 1 through 11 (of 11 total)
You must be logged in to reply to this topic. Login to reply