Below is a query and result
Query
SELECT Job#, Doc#, Value, Description FROM Table
Result
Job# Doc#, Value, Description
1000 1 100 paint house
1000 2 0 clean floors
1001 1 90 install roof
1001 2 0 install boiler
1001 3 0 install elevator
I would like to create single row by Job# where Doc# = 1, but add the Description where Doc# > 1 to the single row as new fields, i.e if there are 15 Documents Doc#(1-15) then there should be 14 new fields for that row and would look like this:
Desired Result
Job# Doc#, Value, Description, Desc2, Desc3, ... Desc14
1000 1 100 paint house clean floors
1001 1 90 install roof install boiler install elevator
How can I write my query to achieve this desired result?