Skip to main content

You are not logged in. Your edit will be placed in a queue until it is peer reviewed.

We welcome edits that make the post easier to understand and more valuable for readers. Because community members review edits, please try to make the post substantially better than how you found it, for example, by fixing grammar or adding additional resources and hyperlinks.

Required fields*

4
  • It's not the answer, but it got me to the answer. Apparently, each computer is listed under every division. ARGH! Commented Aug 6, 2013 at 16:41
  • 1
    I suggest you also change the R.usageWhen LIKE "2012-07-08T12:%" to (R.usageWhen >= '2012-07-08T12:00:00' AND R.usageWhen < '2012-07-08T13:00:00') so index use is possible. Commented Aug 6, 2013 at 16:45
  • @RolandoMySQLDBA: No problem, thanks for a shot in the dark. I often hesitate to do on other sites because people love their down-votes! Can I actually use the greater/less than statements here? The data is unfortunately not stored as a date, but rather as an indexed varchar. Commented Aug 6, 2013 at 16:54
  • 1
    Even if they are strings, as long as the format of the timestamp is maintained as YYY-MM-DDTHH:MM:SS, and the column is indexed as @ypercube hinted at, you should be fine. Commented Aug 6, 2013 at 16:56