|
Posted by Hugo Kornelis on 02/07/06 00:45
On 4 Feb 2006 14:22:07 -0800, --CELKO-- wrote:
>>> his will still bite you if smalldatetime is used. Or if ever an entrymakes it into the datebase with a 23:59:99.993 timestamp. <<
>
>I never use SMALLDATETIME because it is soooo proprietary and does not
>match the FIPS-127 requirements.
Hi Joe,
So instead, you use DATETIME, which also is proprieatary, which also
doesn't match FIPS-127, and which takes twice the space. Good job. For a
table with mostly date columns, your performance will now be about twice
as slow.
>
>>> What is your objection to
> SomeDate >= StartOfInterval
> AND SomeDate < EndOfInterval <<
>
>Mostly style and portable code.
Style, like beauty, is in the eye of the beholder. So I won't comment on
that.
But "portable code"??? <Cough!> Please tell me: what part of the code
above is not portable, and why???
> The BETWEEN predicate reads so much
>better to a human.
Maybe. But does '2006-02-28T23:59:59.997' also read better to a human
than '2006-03-01'???
SomeDate >= '2006-02-01'
AND SomeDate < '2006-03-01'
or
SomeDate BETWEEN '2006-02-01' AND '2006-02-28T23:59:59.997'
Are you really going to tell me that the latter reads better to a human?
--
Hugo Kornelis, SQL Server MVP
[Back to original message]
|