MySQL Lists are EOL. Please join:

List:General Discussion« Previous MessageNext Message »
From:Paul DuBois Date:February 4 2010 12:52am
Subject:Re: Selecting Dates
View as plain text  
On Jan 31, 2010, at 7:35 PM, ML wrote:

> Hi All,
> 
> Switching from Oracle to MySQL, I seem to be having some difficulty selecting dates
> using between or even where >= and <= like:
> 
> SELECT * FROM orders WHERE order_date BETWEEN='2010-01-01' AND '2010-01-30' ORDER BY
> order_date;

No "=" after BETWEEN.

> 
> or
> 
> SELECT * FROM orders WHERE order_date =>'2010-01-01' AND <= '2010-01-30' ORDER
> BY order_date;

Need "order_date <=", not just "<=".

> 
> Neither of these work.
> 
> What am I missing?
> 
> -ML

-- 
Paul DuBois
Sun Microsystems / MySQL Documentation Team
Madison, Wisconsin, USA
www.mysql.com

Thread
Selecting DatesML1 Feb
  • Re: Selecting DatesLucky Wijaya1 Feb
  • Re: Selecting DatesPaul DuBois4 Feb
Re: Selecting Datessureshkumarilu1 Feb
Re: Selecting DatesJim Lyons1 Feb
  • Re: Selecting DatesML1 Feb