List:General Discussion« Previous MessageNext Message »
From:Paul DuBois Date:April 18 2003 6:17pm
Subject:Re: Newbie date range select
View as plain text  
At 14:05 -0400 4/18/03, Verdon Vaillancourt wrote:
>Hi :)
>
>Assuming I am selecting from a table where I have a field called
>`creation_date` with values in the format `YYYY-MM-DD`, should not the
>following query return only rows with creation dates that fall between the
>specified range?

Presumably, yes.  But is creation_date defined as a DATE type, or something
else?

Technically, I'd expect your query to result in an error, because 'table'
in single quotes isn't legal for specifying a table name.

>
>SELECT * FROM 'table' WHERE ((creation_date >= '2003-04-14') AND
>(creation_date <= '2003-04-18'))
>
>I have tried the above query and it seems to be returning all rows, not just
>those within the range.
>
>?? TIA,
>Verdon


-- 
Paul DuBois
http://www.kitebird.com/
sql, query
Thread
Newbie date range selectVerdon Vaillancourt18 Apr
  • Re: Newbie date range selectPaul DuBois18 Apr
    • Re: Newbie date range selectVerdon Vaillancourt18 Apr
      • Newbie UPDATE errorPeter Fleck18 Apr
        • RE: Newbie UPDATE errorRoger Davis18 Apr
          • RE: Newbie UPDATE errorPeter Fleck18 Apr
          • Re: Re[2]: Newbie UPDATE errorMartin19 Apr
Re[2]: Newbie UPDATE errorStefan Hinz19 Apr
  • Re[2]: Newbie UPDATE errorPeter Fleck19 Apr
    • Re[2]: Newbie UPDATE errorPaul DuBois19 Apr