time(urgent)
Hi shif,
If the entrydt is populated with time only (i.e. the datepart is left at
the default 1/1/1900 value), you can use
WHERE entrydt >= '08:30:00'
AND entrydt < '16:30:00'
In this case, an index on the entrydt column can be used to locate the
matching rows.
But if entrydt contains different date parts, you'll have to use
something like the below, which (unfortunately) requires a table or
index scan to find the matching rows:
WHERE CONVERT(char(8), entrydt, 108) >= '08:30:00'
AND CONVERT(char(8), entrydt, 108) < '16:30:00'
Best, Hugo
--
Angband spoilers: http://ourworld.compuserve.com/homepages/hugo_kornelis/Angband/Spoiler/index.htm
Angband UI Patch: http://ourworld.compuserve.com/homepages/hugo_kornelis/Angband/UIpatch/index.htm
--
|