Yeah... I could use the help. I have an idea... but its probably NOT the
best or most efficient way to do it in CF. Enlighten me, por favor!
~Che

-----Original Message-----
Che, I agree with Mark. Anything you do in the DB is going to be more
complex than in CF in this particular case.  I'd just do it in CF.  If you
need help with that code, let us know.

Dave

-----Original Message-----
Che, try this, create a table 1 row and the numbers 0 through 23 in them,
then do
a left join to your group by query :)

-Mark

-----Original Message-----
SELECT Datepart(hh,OrderDate) AS Hour, Count(OrderDate) AS
TotalOrdersPerHour
FROM    Orders
WHERE   Status = 'SHIPPED' AND (OrderDate BETWEEN '8/1/2005' AND '8/31/2005
23:59:59')
GROUP BY Datepart(hh,OrderDate), Datepart(hh,OrderDate)
ORDER BY Datepart(hh,OrderDate) ASC


~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~|
Discover CFTicket - The leading ColdFusion Help Desk and Trouble 
Ticket application

http://www.houseoffusion.com/banners/view.cfm?bannerid=48

Message: http://www.houseoffusion.com/lists.cfm/link=i:4:216480
Archives: http://www.houseoffusion.com/cf_lists/threads.cfm/4
Subscription: http://www.houseoffusion.com/lists.cfm/link=s:4
Unsubscribe: http://www.houseoffusion.com/cf_lists/unsubscribe.cfm?user=89.70.4
Donations & Support: http://www.houseoffusion.com/tiny.cfm/54

Reply via email to