Solved

Want the count number from this QUery

Posted on 2016-09-28
2
71 Views
Last Modified: 2016-09-28
Hi all, I just need the count number from this Query so I can display it.

Set Top10Events=oConn.Execute("SELECT TOP 10 COUNT(a.log_event),a.log_event FROM site_log AS a INNER JOIN events AS b ON a.log_event=b.event_ID WHERE a.log_event<>NULL AND a.log_date BETWEEN #9/29/16&"# AND #6/29/16# AND b.event_start>NOW() GROUP BY a.log_event HAVING COUNT(a.log_event)>0 ORDER BY COUNT(a.log_event) DESC")

Open in new window


Thanks
0
Comment
Question by:Graeme
[X]
Welcome to Experts Exchange

Add your voice to the tech community where 5M+ people just like you are talking about what matters.

  • Help others & share knowledge
  • Earn cash & points
  • Learn & ask questions
2 Comments
 
LVL 33

Accepted Solution

by:
Big Monty earned 500 total points
ID: 41820480
try

Set Top10Events=oConn.Execute("SELECT TOP 10 COUNT(a.log_event) as eventLogCount,a.log_event FROM site_log AS a INNER JOIN events AS b ON a.log_event=b.event_ID WHERE a.log_event<>NULL AND a.log_date BETWEEN #9/29/16&"# AND #6/29/16# AND b.event_start>NOW() GROUP BY a.log_event HAVING COUNT(a.log_event)>0 ORDER BY COUNT(a.log_event) DESC")
Response.Write Top10Events("eventLogCount")
or
Response.Write Top10Events( 0 )
0
 

Author Closing Comment

by:Graeme
ID: 41820484
Set Top10Events=oConn.Execute("SELECT TOP 10 COUNT(a.log_event) as eventLogCount,a.log_event FROM site_log AS a INNER JOIN events AS b ON a.log_event=b.event_ID WHERE a.log_event<>NULL AND a.log_date BETWEEN #9/29/16&"# AND #6/29/16# AND b.event_start>NOW() GROUP BY a.log_event HAVING COUNT(a.log_event)>0 ORDER BY COUNT(a.log_event) DESC")
Response.Write Top10Events("eventLogCount")

Worked! thanks
0

Featured Post

Technology Partners: We Want Your Opinion!

We value your feedback.

Take our survey and automatically be enter to win anyone of the following:
Yeti Cooler, Amazon eGift Card, and Movie eGift Card!

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

I have helped a lot of people on EE with their coding sources and have enjoyed near about every minute of it. Sometimes it can get a little tedious but it is always a challenge and the one thing that I always say is:   The Exchange of informatio…
Have you ever needed to get an ASP script to wait for a while? I have, just to let something else happen. Or in my case, to allow other stuff to happen while I was murdering my MySQL database with an update. The Original Issue This was written…
Michael from AdRem Software outlines event notifications and Automatic Corrective Actions in network monitoring. Automatic Corrective Actions are scripts, which can automatically run upon discovery of a certain undesirable condition in your network.…
If you’ve ever visited a web page and noticed a cool font that you really liked the look of, but couldn’t figure out which font it was so that you could use it for your own work, then this video is for you! In this Micro Tutorial, you'll learn yo…

690 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question