?
Solved

Want the count number from this QUery

Posted on 2016-09-28
2
Medium Priority
?
77 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 2000 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

Free Tool: Path Explorer

An intuitive utility to help find the CSS path to UI elements on a webpage. These paths are used frequently in a variety of front-end development and QA automation tasks.

One of a set of tools we're offering as a way of saying thank you for being a part of the community.

Question has a verified solution.

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

I recently decide that I needed a way to make my pages scream on the net.   While searching around how I can accomplish this I stumbled across a great article that stated "minimize the server requests." I got to thinking, hey, I use more than one…
I was asked about the differences between classic ASP and ASP.NET, so let me put them down here, for reference: Let's make the introductions... Classic ASP was launched by Microsoft in 1998 and dynamically generate web pages upon user interact…
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…
In this video you will find out how to export Office 365 mailboxes using the built in eDiscovery tool. Bear in mind that although this method might be useful in some cases, using PST files as Office 365 backup is troublesome in a long run (more on t…
Suggested Courses

801 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