I have some data in following format :
https://i.sstatic.net/SpHnz.png
could some one plz tell me how to pivot it to:
https://i.sstatic.net/wulVc.png
I have multiple set of such rows for each BatchNo and TransactionDate and want one batchno to be pivoted to one row and so on....
Update from comment a tried SQL not working (cf. comments on details):
SELECT
[1] UnitId, [2] Time, [4] Date, [5] A, [6] a, [8] b, [9] c, [10] ABT,
[11] BatLevel, [12] SC, [13] GC, [14] OB, [17] CO, [18] VO, [19] PO,
[20] PU, [21] CCB
from (
select *
from [ProductTCPTransaction]
) src
PIVOT (
COUNT(TransactionDate)
FOR ParameterID
in ([1],[2],[4],[5],[6],[8],[9],[10],[11],[12],
[13],[14],[17],[18],[19],[20],[21])
) piv