I've built a query which outputs several thousand rows like:
| Person | Date | Hours1 | Hours2 |
Steve 2016 04 18 42.0
John 2016 04 21 32.09
Pete 2016 04 9 78.5
Steve 2016 03 10 10
Dave 2016 03 5 50
etc... etc... etc... etc...
But I need:
|Person | 2016 04 Hours1 | 2016 04 Hours2 | 2016 03 Hours1 | 2016 03 Hours2 | etc...
Dave NULL NULL 5 50 etc...
John 21 32.09 NULL NULL etc...
Pete 9 78.5 NULL NULL etc...
Steve 18 42.0 10 10 etc...
etc... etc... etc... etc... etc... etc...
I've had a look at other questions etc. using transpose / pivoting but I'm not so sure that this is a simple use-case as there are a dynamic number of dates and people, but I don't really know where to start!