I have a view with employee type history.
EmployeeID | EmployeeTypeTit le | EmployeeStartDa te
1 | trial | 2007-09-01
1 | regular | 2008-03-01
2 | trial | 2007-11-01
But now I need the data in a different format, with every month on a single row. Like this
EmployeeID | Period | EmployeeTypeTit le
1 | 200709 | trial
1 | 200710 | trial
1 | 200711 | trial
1 | 200712 | trial
1 | 200801 | trial
1 | 200802 | trial
1 | 200803 | regular
2 | 200711 | trial
2 | 200712 | trial
2 | 200801 | trial
2 | 200802 | trial
2 | 200803 | trial
I hope this make any sense.
EmployeeID | EmployeeTypeTit le | EmployeeStartDa te
1 | trial | 2007-09-01
1 | regular | 2008-03-01
2 | trial | 2007-11-01
But now I need the data in a different format, with every month on a single row. Like this
EmployeeID | Period | EmployeeTypeTit le
1 | 200709 | trial
1 | 200710 | trial
1 | 200711 | trial
1 | 200712 | trial
1 | 200801 | trial
1 | 200802 | trial
1 | 200803 | regular
2 | 200711 | trial
2 | 200712 | trial
2 | 200801 | trial
2 | 200802 | trial
2 | 200803 | trial
I hope this make any sense.
Comment