Hmm that's a solution.. a table for months... can you image this done only by sql commands, with no use of other tables? ----- Original Message ----- From: Scott Brady To: CF-Talk Sent: Thursday, February 27, 2003 2:40 PM Subject: Re: Can SQL do that?
---------- Original Message ---------------------------------- From: "Leonardo Crespo - Cftop.COM" <[EMAIL PROTECTED]> >Suppose in april, i didnt had sales, i would like the query list it too, but with 0 as total. Since i got no April in the MONTH(OrderDate), cos i have no sales in april, this month is not listed. I don't know about MySQL, because I'm not sure about its outer join support, but . . . . If you have a table for the months, you could do an outer join on the two tables (liked with the month_id). That's just off the top of my head, so there might be an easier way (that would work in mySQL). Scott -------------------------------- Scott Brady http://www.scottbrady.net/ ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~| Archives: http://www.houseoffusion.com/cf_lists/index.cfm?forumid=4 Subscription: http://www.houseoffusion.com/cf_lists/index.cfm?method=subscribe&forumid=4 FAQ: http://www.thenetprofits.co.uk/coldfusion/faq Get the mailserver that powers this list at http://www.coolfusion.com Unsubscribe: http://www.houseoffusion.com/cf_lists/unsubscribe.cfm?user=89.70.4

