I'm doing a report page, with all the sales grouped by month. 

Select SUM(OrderTotal) as Total, MONTH(OrderDate) as M 
from orders
GROUP BY Month(OrderDate)

That returns the month and the total as follow:

01(january) 150000
02(feb) 400000
03(mar) 500000
05(may) 200000
and so. 

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. 

Do you guys know a way to do this in SQL (is it possible?)? Of course i can do that in 
coldfusion, but i would like to leave this job to sql. Not a big problem, just want to 
learn something new. 

I'm using MYSQL, but i would like to know if it is possible in others DB like oracle 
and mssql. 

THX

Leonardo Crespo
ICQ: 198810
[EMAIL PROTECTED]

  ----- Original Message ----- 
  From: [EMAIL PROTECTED] 
  To: CF-Talk 
  Sent: Thursday, February 27, 2003 1:48 PM
  Subject: RE: ColdFusion and SMS Messaging


  Geesh!  A super-secret-signal-eating-bread-truck-everyone-knows-about!  And I 
thought growing up in south Florida had oddities!  Are there any black helicopters 
flying around?  Probably don't see them though, they are so stealthy.

  The email gate way method is free.  Now there are SMS services that you can use 
where from what I know of it you interface into the SMS system.  That costs money.  I 
send SMS to my phone via email all the time.  In fact I have my CF servers set to send 
me messages when things aren't kosher. 

  Doug

  >-----Original Message-----
  >From: Joshua Miller [mailto:[EMAIL PROTECTED]
  >Sent: Thursday, February 27, 2003 11:35 AM
  >To: CF-Talk
  >Subject: RE: ColdFusion and SMS Messaging
  >
  >
  >So would there be any fees associated with this method?
  >
  >And yes, we're totally dead. There's a big radio telescope observatory
  >just over the hill from my house (http://www.gb.nrao.edu/) - so we're
  >totally dead for mobile phones and radio transmissions. They even drive
  >around in a bread truck looking for stray signals to kill. 
  >It's strange.
  >
  >Joshua Miller
  >Head Programmer / IT Manager
  >Garrison Enterprises Inc.
  >www.garrisonenterprises.net
  >[EMAIL PROTECTED]
  >(704) 569-9044 ext. 254
  > 
  >***************************************************************
  >*********
  >*************
  >Any views expressed in this message are those of the individual sender,
  >except where the sender states them to be the views of 
  >Garrison Enterprises Inc.
  > 
  >This e-mail is intended only for the individual or entity to 
  >which it is
  >addressed and contains information that is private and confidential. If
  >you are not the intended recipient you are hereby notified that any
  >dissemination, distribution or copying is strictly prohibited. If you 
  >have received this e-mail in error please delete it immediately and
  >advise us by return e-mail to [EMAIL PROTECTED]
  >***************************************************************
  >*********
  >*************
  >
  >
  >-----Original Message-----
  >From: [EMAIL PROTECTED] [mailto:[EMAIL PROTECTED] 
  >Sent: Thursday, February 27, 2003 11:26 AM
  >To: CF-Talk
  >Subject: RE: ColdFusion and SMS Messaging
  >
  >
  >Wow!  A dead area of the US?  Hmmm....
  >Well, by 'email gateways' means you can send an SMS through a normal
  >email system.  For example, to send an SMS to a Cingular phone you can
  >send an email to the email address of <phone
  >number>@mobil.mycingular.com.  So, in yuor case, it sounds like all you
  >need is the format for the email address to your users' phones,
  >something your users could provide you with.
  >
  >Doug
  >
  >>-----Original Message-----
  >>From: Joshua Miller [mailto:[EMAIL PROTECTED]
  >>Sent: Thursday, February 27, 2003 11:18 AM
  >>To: CF-Talk
  >>Subject: RE: ColdFusion and SMS Messaging
  >>
  >>
  >>Our application would be US-only (government contract) so 
  >that's not an
  >
  >>issue.
  >>
  >>What do you mean by "reached through email gateways"? Do you 
  >mean I can
  >
  >>send an email to the phone and it displays as text or what? I need to 
  >>send a simple text message and not something they have to strain to 
  >>open and read. This is all blind to me - I live in a Radio Silent
  >>part of the
  >>country and we can't get AM let alone use a mobile phone. So pardon my
  >>ignorance on the mobile issue.
  >>
  >>Joshua Miller
  >>Head Programmer / IT Manager
  >>Garrison Enterprises Inc.
  >>www.garrisonenterprises.net [EMAIL PROTECTED]
  >>(704) 569-9044 ext. 254
  >> 
  >>***************************************************************
  >>*********
  >>*************
  >>Any views expressed in this message are those of the 
  >individual sender,
  >
  >>except where the sender states them to be the views of Garrison 
  >>Enterprises Inc.
  >> 
  >>This e-mail is intended only for the individual or entity to
  >>which it is
  >>addressed and contains information that is private and 
  >confidential. If
  >>you are not the intended recipient you are hereby notified that any
  >>dissemination, distribution or copying is strictly prohibited. If you 
  >>have received this e-mail in error please delete it immediately and
  >>advise us by return e-mail to 
  >[EMAIL PROTECTED]
  >>***************************************************************
  >>*********
  >>*************
  >>
  >>
  >>-----Original Message-----
  >>From: jon roig [mailto:[EMAIL PROTECTED]
  >>Sent: Thursday, February 27, 2003 10:15 AM
  >>To: CF-Talk
  >>Subject: RE: ColdFusion and SMS Messaging
  >>
  >>
  >>A fair number of different wireless providers can now be
  >>reached through
  >>email gateways. All the US ones can now, but if you want to 
  >>send a phone
  >>email, one generally his to know the phone's provider.
  >>
  >>Outside the US, it's hit or miss... but actually, ICQ has 
  >taken a fair 
  >>amount of the guesswork out of it by providing an email to 
  >sms gateway 
  >>for a fair number of international providers: http://web.icq.com/sms/
  >>
  >>There are also a variety of xml-based services listed on
  >>Xmethods.com to
  >>help with sending sms messages.... none of which I've tried.
  >>
  >> -- jon
  >>
  >>
  >>-----Original Message-----
  >>From: Andrea Galmacci - awd* [mailto:[EMAIL PROTECTED]
  >>Sent: Thursday, February 27, 2003 4:32 AM
  >>To: CF-Talk
  >>Subject: Re: ColdFusion and SMS Messaging
  >>
  >>
  >>Which kind of interfacing are you looking for? SMSC or 
  >GSM/GPRS modem? 
  >>Are you going to manage the reception of SMS replies as well?
  >>
  >>
  >>Andrea
  >>
  >>----- Original Message -----
  >>From: "Joshua Miller" <[EMAIL PROTECTED]>
  >>To: "CF-Talk" <[EMAIL PROTECTED]>
  >>Sent: Tuesday, February 25, 2003 7:41 AM
  >>Subject: ColdFusion and SMS Messaging
  >>
  >>
  >>> Anyone have any leads on what it takes to send SMS messages from
  >>> ColdFusion applications? I'd like to implement a messaging 
  >system to 
  >>> send alerts out to users - any information appreciated!
  >>>
  >>> Joshua Miller
  >>> Head Programmer / IT Manager
  >>> Garrison Enterprises Inc.
  >>> www.garrisonenterprises.net <http://www.garrisonenterprises.net/>
  >>> [EMAIL PROTECTED]
  >>> (704) 569-9044 ext. 254
  >>>
  >>> 
  >>**********************************************************************
  >>> **
  >>> *************
  >>> Any views expressed in this message are those of the individual
  >>sender,
  >>> except where the sender states them to be the views of Garrison 
  >>> Enterprises Inc.
  >>>
  >>> This e-mail is intended only for the individual or entity to
  >>which it
  >>> is addressed and contains information that is private and
  >>> confidential. If you are not the intended recipient you are hereby 
  >>> notified that any dissemination, distribution or copying is 
  >strictly 
  >>> prohibited. If you have received this e-mail in error please 
  >>delete it
  >>
  >>> immediately and advise us by return e-mail to
  >>> <mailto:[EMAIL PROTECTED]>
  >>> [EMAIL PROTECTED]
  >>> 
  >>**********************************************************************
  >>> **
  >>> *************
  >>>
  >>>
  >>>
  >>
  >>
  >>
  >
  >
  
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~|
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
Signup for the Fusion Authority news alert and keep up with the latest news in 
ColdFusion and related topics. http://www.fusionauthority.com/signup.cfm

                                Unsubscribe: 
http://www.houseoffusion.com/cf_lists/unsubscribe.cfm?user=89.70.4
                                

Reply via email to