Posted by Dan Guzman on 06/26/07 11:52
> select order from ordertable
> where orderdate >= '06/20/2007' and orderdate < '06/21/2007'
I would expect this query to work if the orderdate column is a datetime data
type (although format 'yyyymmdd' is preferred since it is unambiguous). In
the case of char or varchar, string comparison rules are used instead so you
might not get the results you expect.
--
Hope this helps.
Dan Guzman
SQL Server MVP
<navneetkasulkar@gmail.com> wrote in message
news:1182854550.095525.236690@o11g2000prd.googlegroups.com...
>I have a problem in this query:
>
> select order from ordertable
> where orderdate >= '06/20/2007' and orderdate < '06/21/2007'
>
> this query do not return any record
> although there are records in the table matching the query
>
> please help me
>
[Back to original message]
|