Tag Info

Hot answers tagged


There are several ways to do this. One would be to use a pipelined function to return the additional row when the day spanning condition is detected. Another way is to duplicate the rows and then eliminate the ones that don't need to be duplicated and adjust the times for those that do. Here is an example: SELECT Case When TwoRowsNeeded = 1 And ...

Only top voted, non community-wiki answers of a minimum length are eligible