List:General Discussion« Previous MessageNext Message »
From:Gerald Clark Date:August 27 2002 8:55pm
Subject:Re: help in making the query to use the index
View as plain text  
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,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 expenditure column.
>Still my query goes for the full table scan.
>
>With regards
>kamesh jayachandran
>
>------------------------------------------------------------
> Get your FREE web-based e-mail and newsgroup access at:
>                http://MailAndNews.com
>
> Create a new mailbox, or access your existing IMAP4 or
> POP3 mailbox from anywhere with just a web browser.
>------------------------------------------------------------
>
>
>---------------------------------------------------------------------
>Before posting, please check:
>   http://www.mysql.com/manual.php   (the manual)
>   http://lists.mysql.com/           (the list archive)
>
>To request this thread, e-mail <mysql-thread118075@stripped>
>To unsubscribe, e-mail
> <mysql-unsubscribe-rudy.metzger=pareto.nl@stripped>
>Trouble unsubscribing? Try: http://lists.mysql.com/php/unsubscribe.php
>
>


Thread
help in making the query to use the indexkamesh jayachandran27 Aug
  • Re: help in making the query to use the indexGerald Clark27 Aug
RE: help in making the query to use the indexkamesh jayachandran27 Aug
  • Re: help in making the query to use the indexGerald Clark28 Aug