Re: Can SQL do that?

2003-02-27 Thread Scott Brady
-- Original Message -- From: "Leonardo Crespo - Cftop.COM" <[EMAIL PROTECTED]> Reply-To: [EMAIL PROTECTED] Date: Thu, 27 Feb 2003 17:02:31 -0300 >Hmm that's a solution.. a table for months... can you image this done only by sql >commands, with no use of ot

Re: Can SQL do that?

2003-02-27 Thread Leonardo Crespo - Cftop.COM
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 Me

RE: Can SQL do that?

2003-02-27 Thread Douglas.Knudsen
- >From: Leonardo Crespo - Cftop.COM [mailto:[EMAIL PROTECTED] >Sent: Thursday, February 27, 2003 12:29 PM >To: CF-Talk >Subject: Can SQL do that? > > >I'm doing a report page, with all the sales grouped by month. > >Select SUM(OrderTotal) as Total, MONTH(Orde

Re: Can SQL do that?

2003-02-27 Thread Stephen Hait
> 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) 15 > 02(feb) 40 > 03(mar) 50 > 05(may) 20 > a

Re: Can SQL do that?

2003-02-27 Thread Scott Brady
-- 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

Can SQL do that?

2003-02-27 Thread Leonardo Crespo - Cftop.COM
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) 15 02(feb) 40 03(mar) 50 05(may) 20 and so. Suppose in april,