Selasa, 04 November 2014

[MS_AccessPros] Stuck on query totals

 

Greetings Pros,

 

I’m stuck on a query where I’m gathering usage data.

 

I am using a table called LogStats which captures the date logged in/out, the user, and the database.

 

My totals are not adding up correctly.

 

The easiest example is a small database where I have 4 logins from 2 users within the last 30 days.  I have a query built that yields a count of 4 for these 2 users because I can’t get the thing to show me 2 users logged in for that time period.

 

Here is the sql:

 

SELECT DISTINCTROW LogStats.WhichDatabase, Count(LogStats.UserLoggedIn) AS CountOfUserLoggedIn

FROM LogStats

WHERE (((LogStats.TimeLoggedIn)>Date()-30))

GROUP BY LogStats.WhichDatabase;

 

Please help.  I am having a humbling experience because I think I should know better by now but ah well…

 

 

Respectfully,

Liz Ravenwood

Programmer / Analyst

B/E Aerospace | Super First Class Environments

 

1851 S Pantano Road | Tucson, Arizona 85710

Office +1.520.239.4808 |

beaerospace.com

Passion to Innovate. Power to Deliver

 



This email (and all attachments) is for the sole use of the intended recipient(s) and may contain privileged and/or proprietary information. Any unauthorized review, use, disclosure or distribution is prohibited. If you are not the intended recipient, please contact the sender by reply e-mail and destroy all copies of the original message.

__._,_.___

Posted by: Liz Ravenwood <Liz_Ravenwood@beaerospace.com>
Reply via web post Reply to sender Reply to group Start a New Topic Messages in this topic (1)

.

__,_._,___

Tidak ada komentar:

Posting Komentar