Che, You can use isnull() in SQL Server and nvl() in Oracle. I don't know which DB you're using.
Dave -----Original Message----- From: Che Vilnonis [mailto:[EMAIL PROTECTED] Sent: Thursday, August 25, 2005 4:53 PM To: CF-Talk Subject: Quick Query Question...[hopefully] If have a query that returns a 24 hour breakdown of orders by the hour on a monthly basis. (see below). As you can see, Hour 5 & 6 are missing because there are no values to return. What would be the easiest way to add Hour 5 and Hour 6 to the query's recordset with a corresponding value of zero for each hour? The trick is, from month to month, the hours that have no values might change. Any idee-ers? Thanks, Che. HOUR TOTALORDERSPERHOUR 0 5 1 5 2 4 3 2 4 2 7 3 8 2 9 10 10 7 11 7 12 3 13 5 14 11 15 10 16 6 17 13 18 7 19 13 20 9 21 16 22 11 23 14 ****************************************************************************************** The information contained in this message, including attachments, may contain privileged or confidential information that is intended to be delivered only to the person identified above. If you are not the intended recipient, or the person responsible for delivering this message to the intended recipient, ALLTEL requests that you immediately notify the sender and asks that you do not read the message or its attachments, and that you delete them without copying or sending them to anyone else. ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~| 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:216471 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=11502.10531.4 Donations & Support: http://www.houseoffusion.com/tiny.cfm/54