UNPIVOT in SQL Server
sql server convert columns to rows in a table
sql server transpose columns to rows
unpivot in sql server example
sql server unpivot example
In this video we will discuss UNPIVOT operator in SQL Server.
Healthy diet is very important both for the body and mind. If you like Aarvi Kitchen recipes, please support by sharing, subscribing and liking our YouTube channel. Hope you can help.
https://www.youtube.com/channel/UC7sEwIXM_YfAMyonQCrGfWA/?sub_confirmation=1
PIVOT operator turns ROWS into COLUMNS, where as UNPIVOT turns COLUMNS into ROWS.
We dicussed PIVOT operator in Part 54 of SQL Server tutorial. Please watch Part 54 before proceeding.
http://csharp-video-tutorials.blogspot.com/2012/10/pivot-operator-in-sql-server-part-54.html
Let us understand UNPIVOT with an example. We will use the following tblProductSales table in this demo.
SQL Script to create tblProductSales table
Create Table tblProductSales
(
SalesAgent nvarchar(50),
India int,
US int,
UK int
)
Go
Insert into tblProductSales values ('David', 960, 520, 360)
Insert into tblProductSales values ('John', 970, 540, 800)
Go
Write a query to turn COLUMNS into ROWS.
SELECT SalesAgent, Country, SalesAmount
FROM tblProductSales
UNPIVOT
(
SalesAmount
FOR Country IN (India, US ,UK)
) AS UnpivotExample
Text version of the video
http://csharp-video-tutorials.blogspot.com/2015/10/unpivot-in-sql-server.html
Slides
http://csharp-video-tutorials.blogspot.com/2015/10/unpivot-in-sql-server_10.html
All SQL Server Text Articles
http://csharp-video-tutorials.blogspot.com/p/free-sql-server-video-tutorials-for.html
All SQL Server Slides
http://csharp-video-tutorials.blogspot.com/p/sql-server.html
All Dot Net and SQL Server Tutorials in English
https://www.youtube.com/user/kudvenkat/playlists?view=1&sort=dd
All Dot Net and SQL Server Tutorials in Arabic
https://www.youtube.com/c/KudvenkatArabic/playlists
Видео UNPIVOT in SQL Server канала kudvenkat
sql server transpose columns to rows
unpivot in sql server example
sql server unpivot example
In this video we will discuss UNPIVOT operator in SQL Server.
Healthy diet is very important both for the body and mind. If you like Aarvi Kitchen recipes, please support by sharing, subscribing and liking our YouTube channel. Hope you can help.
https://www.youtube.com/channel/UC7sEwIXM_YfAMyonQCrGfWA/?sub_confirmation=1
PIVOT operator turns ROWS into COLUMNS, where as UNPIVOT turns COLUMNS into ROWS.
We dicussed PIVOT operator in Part 54 of SQL Server tutorial. Please watch Part 54 before proceeding.
http://csharp-video-tutorials.blogspot.com/2012/10/pivot-operator-in-sql-server-part-54.html
Let us understand UNPIVOT with an example. We will use the following tblProductSales table in this demo.
SQL Script to create tblProductSales table
Create Table tblProductSales
(
SalesAgent nvarchar(50),
India int,
US int,
UK int
)
Go
Insert into tblProductSales values ('David', 960, 520, 360)
Insert into tblProductSales values ('John', 970, 540, 800)
Go
Write a query to turn COLUMNS into ROWS.
SELECT SalesAgent, Country, SalesAmount
FROM tblProductSales
UNPIVOT
(
SalesAmount
FOR Country IN (India, US ,UK)
) AS UnpivotExample
Text version of the video
http://csharp-video-tutorials.blogspot.com/2015/10/unpivot-in-sql-server.html
Slides
http://csharp-video-tutorials.blogspot.com/2015/10/unpivot-in-sql-server_10.html
All SQL Server Text Articles
http://csharp-video-tutorials.blogspot.com/p/free-sql-server-video-tutorials-for.html
All SQL Server Slides
http://csharp-video-tutorials.blogspot.com/p/sql-server.html
All Dot Net and SQL Server Tutorials in English
https://www.youtube.com/user/kudvenkat/playlists?view=1&sort=dd
All Dot Net and SQL Server Tutorials in Arabic
https://www.youtube.com/c/KudvenkatArabic/playlists
Видео UNPIVOT in SQL Server канала kudvenkat
Показать
Комментарии отсутствуют
Информация о видео
Другие видео канала
![SQL Unpivot and more](https://i.ytimg.com/vi/gm69BCIsvH8/default.jpg)
![Pivot in sql server 2008 Part 54](https://i.ytimg.com/vi/h3BtudZehuo/default.jpg)
![Reverse PIVOT table in SQL Server](https://i.ytimg.com/vi/0gQnPxyY9mw/default.jpg)
![Sql date interview questions](https://i.ytimg.com/vi/MTic9r3UnLg/default.jpg)
![SQL Pivot and Unpivot | Quick Tips Ep57](https://i.ytimg.com/vi/686igmBEsVI/default.jpg)
![Dynamic SQL in SQL Server](https://i.ytimg.com/vi/n-hkNm2Q9fw/default.jpg)
![](https://i.ytimg.com/vi/Iae0pfVrZ1o/default.jpg)
![SQL Tutorial - UNPIVOT](https://i.ytimg.com/vi/0ERIr8UAK1s/default.jpg)
![](https://i.ytimg.com/vi/v4AG1oGK6r4/default.jpg)
![SQL Server Programming Part 17 - The Pivot Operator](https://i.ytimg.com/vi/C37-SKZDsdU/default.jpg)
![Part 1 How to find nth highest salary in sql](https://i.ytimg.com/vi/fvPddKyHxpQ/default.jpg)
![SQL Window Functions on Data Science Interviews in 2021 | Asked By Airbnb, Netflix, Twitter, Uber](https://i.ytimg.com/vi/XBE09l-UYTE/default.jpg)
![SQL Query | How to dynamically convert rows into columns | Dynamic Pivot](https://i.ytimg.com/vi/Abn3w0EYOf4/default.jpg)
![CTE (Common Table Expression) IN SQL With Examples| ADVANCE SQL TUTORIAL](https://i.ytimg.com/vi/IerMjQZ87os/default.jpg)
![Part 6 Transform rows into columns in sql server](https://i.ytimg.com/vi/C0mQqDnF7wQ/default.jpg)
![Lead and Lag functions in SQL Server 2012](https://i.ytimg.com/vi/l_Zn5sdkamM/default.jpg)
![SQL performance tuning and query optimization using execution plan](https://i.ytimg.com/vi/t2R0-xcKw44/default.jpg)
![Microsoft SQL Server Development Part 6 : Dynamic UnPivot in SQL Server](https://i.ytimg.com/vi/E0qZEhjSH1M/default.jpg)
![Rank and Dense Rank in SQL Server](https://i.ytimg.com/vi/5-La_uSNkKU/default.jpg)
![SQL Query | Convert data from columns into Rows | Unpivot](https://i.ytimg.com/vi/mf4ABpHqgag/default.jpg)