your date strings are incorrect.
As a string it should be '2002-08-01'
but it can also be treated as a numeric.
try:
and expendituredate between 20020801 and 20020831
kamesh jayachandran wrote:
>Hi Gerald,
>I tried the following query,
>select DATE_FORMAT(expendituredate,"%d-%b-%Y") as expdate,
Hi Gerald,
I tried the following query,
select DATE_FORMAT(expendituredate,"%d-%b-%Y") as expdate,sum(amount) as
amount from expenditure where userid=11 and expendituredate between
'2002-8-01' and '2002-8-31' group by expendituredate order by
expendituredate;
which is not overriding the expend
Your query overloads expendituredate.
Mysql now has to scqan the whole table to see if the new expenditure
date will
meet the where clause ( which it never will )
try DATE_FORMAT(expendituredate,"%F=%b-%Y) as expdate
and see what happens.
kamesh jayachandran wrote:
>Hi all,
>I have a table na
Hi all,
I have a table named expenditure whose create statement is as follows,
expenditure | CREATE TABLE `expenditure` (
`expenditureid` int(11) unsigned NOT NULL auto_increment,
`expendituredate` date NOT NULL default '-00-00',
`artifactid` smallint(5) unsigned NOT NULL default '0',