Level Extreme platform
Subscription
Corporate profile
Products & Services
Support
Legal
Français
Help With Query
Message
General information
Forum:
Microsoft SQL Server
Category:
SQL syntax
Title:
Miscellaneous
Thread ID:
01245198
Message ID:
01245211
Views:
22
You have two shifts here:
One 07:00 - 18:59
Two 19:00 - 06:00

BUT
No value could be BETWEEN 19:00 AND 06:00, just because 19:00 is bigger than 06:00, you must add date part for both tests and if TIME part for END is smaller than begin add one day, other way is to reverse it: Start 06:00 end 19:00, but then your CASE sequence is crucial, you always have to check for the ONE first. (not tested at all)
Against Stupidity the Gods themselves Contend in Vain - Johann Christoph Friedrich von Schiller
The only thing normal about database guys is their tables.
Previous
Next
Reply
Map
View

Click here to load this message in the networking platform