About 48,700 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. 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 …

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

    A pivot is used to convert one of the columns in your data set from rows into columns (this is typically referred to as the spreading column). In the example you have given, this means …

  4. How to pivot a table in sql and sum the amounts? - Stack Overflow

    Mar 17, 2022 · I have a table called test_table. This table looks like below id type value 1 tax 10 1 premium 21 1 tax 3 1 correction 4.5 2 premium 15 I would like to "pivot" this table …

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

    Jun 19, 2019 · The PIVOT resolves the ID of the table that holds the multiple values that we want to display in the final results. Lets look at 3 first, as this demonstrates a single PIVOT and how …

  6. 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.

  7. 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.

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

    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 data. For example, I …

  9. How to ORDER BY in SQL PIVOT - Stack Overflow

    Dec 7, 2012 · How to ORDER BY in SQL PIVOT Asked 13 years ago Modified 2 years, 8 months ago Viewed 51k times

  10. sql server - T-SQL pivot where clause - Stack Overflow

    in SQL Server i want PIVOT a table and add a WHERE clause but i cant figure out the syntax. The data