Please see attached ON the DATABASE TABLE TAB. This is my source DATA.
Please see attached ON the How it Should look TAB.
Mapping FROM the DATABASE TABLE
Occurence = Wall
COLUMN 1 = The multiplier WHERE Priority=1 FROM the databasetable
COLUMN 2 = The multiplier WHERE Priority=2 FROM the databasetable
Please see attached ON the What Query returns tab
This is not what I want. I need TO PIVOT the priority As the columns AND THEN DROP the multiplier VALUES IN each COLUMN according TO priority
Here is my query. Can someone please take a look and tell me what I should do to make this work. If possible, could you provide some code.
select Occurence AS Wall, Multiplier, , 
select Occurence, Multiplier,Priority, row_number() over (partition by Occurence ORDER BY Occurence) rn
pivot(Max(Priority) for rn in (, )) p
ORDER BY Occurence
I am really in a bind to get this working. Any help would be greatly appreciated.