SQL Server Tracking Scheduled Shifts when the day varies

后端 未结 2 1098
傲寒
傲寒 2021-01-16 05:30

I\'m not even sure where to start in solving this one, I need to query production data from our MS SQL 2012 Db that has a datetime stamp based on the shift it was recorded i

2条回答
  •  借酒劲吻你
    2021-01-16 06:00

    I'm sure it will get even tricker when there is a holiday or a shutdown occurs. You are thinking like a programmer, you are thinking there is an algorithm that can determine your answer. Instead, if would advise that you think like a data-guy. There should be a source of information somewhere that has the answer you seek. Ask the person who sets up the schedule if he knows. There should be a table somewere that tells you what shifts are assigned to what time slots. Use the data it contains to get your answer.

提交回复
热议问题