I am trying to create a pivot table using the following information:
SELECT
[RecordId],
[Source],
[Channel],
[Reading],
[DownloadDateTime]
FROM [dbo].[tblDataSource]
WHERE source = 'CSLF'
turning this…
Source Channel Reading DownloadDateTime
CSLF Flare_Temp 1305 2016-04-26 22:18:40.290
CSLF Flare_Flow 671 2016-04-26 22:18:41.600
CSLF Methane 54.2 2016-04-26 22:18:42.960
Into this…
DownloadDateTime FlareTemp FlareFlow Methane
2016-04-26 1305 671 54.2
Any ideas of how to do this?