|
Posted by Roy Harvey on 09/13/06 11:36
BETWEEN is inclusive of the values being tested, the equivelent of
changing > to >= and < to <=. BETWEEN also has significant problems
when the datetime column has a non-zero time, because the end date has
not time and any rows with non-zero times for that date are outside
the range, and thus excluded. You are better off avoiding BETWEEN for
dates.
Roy Harvey
Beacon Falls, CT
On Wed, 13 Sep 2006 12:24:20 +0100, "@sh" <spam@spam.com> wrote:
>Ahhhhh sorry for being silly, knew it'd be something obvious, not having a
>good week!!!
>
>Is it possible to use BETWEEN for such a SQL statement?
>
>Cheers, @sh
>
>
>"Roy Harvey" <roy_harvey@snet.net> wrote in message
>news:eipfg21v7lgkd3nk8fg5ulg1jfou2ah43l@4ax.com...
>> On Wed, 13 Sep 2006 11:59:46 +0100, "@sh" <spam@spam.com> wrote:
>>
>>> WHERE DateGiven > '10/09/2006' AND <
>>>'13/09/2006'
>>
>> WHERE DateGiven > '10/09/2006'
>> AND DateGiven < '13/09/2006'
>>
>> You need to specify DateGiven for each comparison.
>>
>> Roy Harvey
>> Beacon Falls, CT
>
Navigation:
[Reply to this message]
|