About 1,440,000 results
Open links in new tab
  1. Convert Rows to columns using 'Pivot' in SQL Server

    Apr 10, 2013 · Pivot is one of the SQL operator which is used to turn the unique data from one column into multiple column in the output. This is also mean by transforming the rows into …

  2. Understanding PIVOT function in T-SQL - Stack Overflow

    10 These are the very basic pivot example kindly go through that. SQL SERVER – PIVOT and UNPIVOT Table Examples Example from above link for the product table:

  3. SQL Server dynamic PIVOT query? - Stack Overflow

    This procedure is going to take in the key variables of a pivot statement to dynamically create pivot statements for varying tables, column names and aggregates.

  4. In SQL Server how to Pivot for multiple columns - Stack Overflow

    Mar 4, 2022 · This is my sample table, I want to pivot the category column and get the sales, stock and target as rows I want the sample output in this form as shown in the below wherein …

  5. tsql - PIVOT en SQL Server - Stack Overflow en español

    Nov 13, 2023 · PIVOT en SQL Server Formulada hace 2 años y 1 mes Modificada hace 2 años y 1 mes Vista 3k veces

  6. sql server - Simple way to transpose columns and rows in SQL?

    Then you apply the aggregate function sum() with the case statement to get the new columns for each color. Unpivot and Pivot Static Version: Both the UNPIVOT and PIVOT functions in SQL …

  7. SQL Server PIVOT on key-value table - Stack Overflow

    Dec 29, 2010 · SQL Server needs some way of combining the many possible rows into one value. You happen to have one value but the PIVOT functionality is made with many rows in mind.

  8. sql - TSQL Pivot without aggregate function - Stack Overflow

    The columns besides for the pivot are the group by's. So you can create a row_number in your data partioned by the other group by's and include that in your pivot data. for example:

  9. Pivots with dynamic columns in SQL Server - Stack Overflow

    Oct 20, 2011 · I am working on an SQL Query using pvots with dynamic columns in SQL Server (T-sql). Rather than submitting my lengthy query, I’m illustrating my problem with a simplified …

  10. sql - Efficiently convert rows to columns - Stack Overflow

    I'm looking for an efficient way to convert rows to columns in SQL Server, I heard that PIVOT is not very fast, and I need to deal with lot of records. This is my example: Id Value ColumnName …