About 121,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. sql server - How to pivot column values into columns? - Stack …

    PIVOT BY CAST(LoginDate AS DATE) i just can't seem to wrap my head out the PIVOT syntax; in order to tell SQL Server what column values should become columns, and what column …

  3. In SQL Server how to Pivot for multiple columns

    Mar 4, 2022 · The answer by Ankur Gupta gives the technique to use. You can have multiple pivots, but they cannot share the same "column that contains the values that become column …

  4. sql - Pivot multiple rows / columns into 1 row - Stack Overflow

    Jun 19, 2019 · We need to take multiple rows and multiple columns and transpose them into 1 row per key. I have a pivot query, but it is not working. I get some error about "Column ...

  5. sql - How to pivot dynamically with date as column - Stack Overflow

    Jan 1, 2014 · date product_id items For products and dates where stock is not available you display 0. isnull will do the trick. Make sure the date column is converted to varchar in the …

  6. sql - PIVOT with MONTH () - Stack Overflow

    Aug 22, 2011 · How can I pivot for a column with dates as month? Example: Data: |-----------------------------------| | def_kstnr | def_zeit | def_datum ...

  7. sql - Dynamic Pivot Needed with Row_Number () - Stack Overflow

    12347 Partially Met Partially Met Did Not Meet Met The columns are unknown so I know I need a dynamic query. I have tried a dynamic query with a pivot function but only got groupings under …

  8. SQL Server: Examples of PIVOTing String data - Stack Overflow

    May 7, 2025 · Trying to find some simple SQL Server PIVOT examples. Most of the examples that I have found involve counting or summing up numbers. I just want to pivot some string …

  9. t sql - Pivoting with Sum function in tsql - Stack Overflow

    Jul 6, 2012 · You can easily use a PIVOT for this. As the other have said you can use a Static Pivot that you code the columns that you want or you can use a Dynamic Pivot, which get the …

  10. sql - Pivoting rows into columns dynamically in Oracle - Stack …

    Apr 22, 2017 · First of all, dynamically pivot using pivot xml again needs to be parsed. We have another way of doing this by storing the column names in a variable and passing them in the …

Refresh