Structured Query Language (SQL). For questions about the language, not Microsoft SQL Server (tag sql-server).

learn more… | top users | synonyms (2)

7
votes
2answers
219 views
+250

Unexpected CASE evaluation logic

I always understood that the CASE statement worked on a 'short-circuit' principle in that evaluation of subsequent steps does not take place if a prior step is evaluated to true. (This answer Does SQL ...
11
votes
4answers
270 views
+250

Group daily schedule into [Start date; End date] intervals with the list of week days

Update: see comparison of answers below. I need to convert data between two systems. First system stores schedules as a plain list of dates. Each date that is included in the schedule is one row. ...