Now I have a game summary table like this:

And I want to split the “starttime” and “endtime” by hours and to convert it into following detailed look:

It’s kind of similar as Unpivot but not exactly the same. How should I write the sql statement? Thanks a tons!!
In PostgreSQL is:
In this Link you can see how to add
generate_seriesfunction to SQL Server 2008.View in action Here