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

    Apr 10, 2013 · 413 If you are using SQL Server 2005+, then you can use the PIVOT function to transform the data from rows into columns. It sounds like you will need to use dynamic sql if the …

  2. 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 converting the …

  3. PIVOT and UNPIVOT in SQL - Scaler Topics

    Mar 8, 2024 · PIVOT in SQL server is a relational operator that converts rows into columns of a table. It allows us to aggregate data by any column of a table. Learn more on Scaler Topics.

  4. 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 have a ...

  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 - Pivot multiple rows / columns into 1 row - Stack Overflow

    Jun 19, 2019 · PIVOT will make a column for each value in the FOR column and will give that column the value of the aggregation function that you specify It helps to visualise the constructed record set, …

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

    Mar 17, 2022 · Google how to do a pivot and have a go at it. May be best to create a grouped by ID table and sum the values and pivot off that, although you can sum in the pivot

  8. SQL Server dynamic PIVOT query? - Stack Overflow

    SQL Server dynamic PIVOT query? Asked 13 years, 8 months ago Modified 2 years, 3 months ago Viewed 372k times

  9. 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 the categories …

  10. sql server - How to pivot column values into columns? - Stack Overflow

    GROUP BY Username 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 …