sql - Pivot single column with into multiple columns -
I need help with a query to help me do the following:
I Format: and change it to: Thank you all in advance! You can use PIVOT to get the results, but you can Would you like to use a windowing function like see Sales order number start the position of numbering Crew name 29002 Turner, Linda closed 2014-01-22 2014-01-24 Espinoza, H. 29002 Turner, Linda Clod 2014-01-22 2014-01-24 Chevrolet, c. 29002 Turner, Linda Clod 2014-01-22 2014-01-24 Valdness, R
Sales order number status of numbers Start CrewName1 CrewName2 CrewName3 29002 Turner, Linda Close 2014-01-22 2014-01-24 Espinoza, H Severt, C. Valladars, R.
SalesOrderNumber
row_number () to create a unique value for each line in code> code. Then these unique numbers will then be used to create your new columns:
select sales number, custom name, position, start, [end], crew 1 = [1], crew 2 = [2], Crew 3 = [3] Classification ([1]) (from Sevesterordan, custom name, status, start, [End], kremenum, row_number (), [2], [3]) piv;
Comments
Post a Comment