RE: group by date, missing something

2005-06-24 Thread mayo
Jochem, Thx. I've reread your posts a few times. It will help next time. -- gil -Original Message- From: Jochem van Dieten [mailto:[EMAIL PROTECTED] Sent: Thursday, June 23, 2005 6:41 PM To: CF-Talk Subject: Re: group by date, missing something mayo wrote: SELECT MONTH(saleDate

Re: group by date, missing something

2005-06-23 Thread Jochem van Dieten
mayo wrote: SELECT MONTH(saleDate) AS theMonth, sum(saleTotal) as dailyTotal FROM sales GROUP by theMonth I know you already know how to solve your problem, but please bear with me :) The reason that your query isn't supposed to work (it will work in some implementations) is that DBMS's

Re: group by date, missing something

2005-06-22 Thread Barney Boisvert
Did you try putting MONTH(saleDate) directly in the GROUP BY clause? cheers, barneyb On 6/22/05, mayo [EMAIL PROTECTED] wrote: I'm trying to do a group by date on an access db. I have a list of sales and want to group by month and year. I can't get even a test run to work SQL below:

Re: group by date, missing something

2005-06-22 Thread eric.creese
SELECT sum(saleTotal), saledate FROM sales GROUP BY saledate - Original Message - From: mayo [EMAIL PROTECTED] To: CF-Talk cf-talk@houseoffusion.com Sent: Wednesday, June 22, 2005 6:29 PM Subject: group by date, missing something I'm trying to do a group by date on an access db. I

RE: group by date, missing something

2005-06-22 Thread Dawson, Michael
. That is the only way you can really group the results correctly. M!ke From: eric.creese [mailto:[EMAIL PROTECTED] Sent: Wed 6/22/2005 6:34 PM To: CF-Talk Subject: Re: group by date, missing something SELECT sum(saleTotal), saledate FROM sales GROUP BY saledate

RE: group by date, missing something

2005-06-22 Thread mayo
, 2005 7:35 PM To: CF-Talk Subject: Re: group by date, missing something SELECT sum(saleTotal), saledate FROM sales GROUP BY saledate - Original Message - From: mayo [EMAIL PROTECTED] To: CF-Talk cf-talk@houseoffusion.com Sent: Wednesday, June 22, 2005 6:29 PM Subject: group by date

RE: group by date, missing something - SOLVED, thx

2005-06-22 Thread mayo
- From: mayo [mailto:[EMAIL PROTECTED] Sent: Wednesday, June 22, 2005 9:52 PM To: CF-Talk Subject: RE: group by date, missing something Thanks eric, but that gives a total for every day. June 21 10,000 June 20 9,555 June 19 11,200 . That's useful but I'm trying to get