if I have the following table:
Member_Key Member_Name col1 Mem1 col2 Mem2 col3 Mem3 col4 Mem4
-----------------------------------------------------------------------------------------------
31 100.00 - Some Account 9 Rollup1 268 Rollup2 246 Rollup3 238 Rollup4
31 100.00 - Some Account 270 Rollup5 271 Rollup6 NULL NULL NULL NULL
31 100.00 - Some Account 283 Rollup7 NULL NULL NULL NULL NULL NULL
Required Result:
Member_Key Member_Name col1 mem1 col2 mem2 col3 mem3 col4 mem4 col5 mem5 col6 mem6 col7 mem7
I try to do this with 1 account, to try to make it dynamic for x the number of accounts that have the number of drives, and put them in one result of the variable column, but I can't seem to make it work with PIVOT or SELECT CASE . Any help or links would be greatly appreciated.
source
share