sql - Pivot single column with into multiple columns -


I need help with a query to help me do the following:

I Format: 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

and change it to:

  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.   

Thank you all in advance! You can use PIVOT to get the results, but you can SalesOrderNumber

Would you like to use a windowing function like 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;   

see

Comments

Popular posts from this blog

python - Writing Greek in matplotlib labels, titles -

c# - LINQ to Entities does not recognize the method 'Int32 IndexOf(System.String, System.StringComparison)' method -

Pygame memory leak with transform.flip -