Home
Search results “Oracle dynamic pivot”
PIVOT Tutorial - generating dynamic column with PIVOT Interview Question SQL
 
14:14
In this lecture you will learn about PIVOT operator and using it to generate dynamic columns.PIVOT is very use full operator to convert values into columns. PIVOT: •Convert your output from (values)vertical order to horizontal(making columns) one Topic to cover: •PIVOT example •PIVOT syntax •Interview Question •PIVOT on northwind •Dynamic PIVOT query http://www.techsapphire.in/index/pivot_sql_lesson_with_generating_dynamic_columns_with_pivot/0-158
Views: 27232 techsapphire
Using Pivot clause in Oracle  PLSQL.
 
08:51
Pivot is a wonderful feature in Oracle which helps you your aggregate based sql results to be transformed from row to column where you can put your group based columns to display it's aggregate value into columns.
Views: 3511 Subhroneel Ganguly
SQL Dynamic Pivot Example Adventure Works
 
05:16
TSQL Dynamic Pivot example in adventure works. Pivot Example: https://www.youtube.com/watch?v=HmXv76kh78M Concatenate all product ids: https://www.youtube.com/watch?v=1kfp0s-lc3M
Views: 1014 Blake B
Oracle sql Interview Question : How to change rows to column
 
09:18
This video tutorial talks about the frequently asked oracle sql interview question of changing rows to the column. Based on the given scenario, we are asked to change the presentation of data in a table with 3 rows and 2 column to 3 columns and 2 rows. Decode Function in oracle https://youtu.be/YUAjPMjqMws Pivot and unpivot in oracle https://youtu.be/6s0DI1YcWIM
Views: 12361 Kishan Mashru
Oracle Pivot clause
 
07:44
oracle pivot example http://easy-learning-tech.blogspot.in/2018/05/pivot-on-sql.html
Views: 247 Siva Academy
Oracle tutorial : Pivot In Oracle PL SQL
 
09:06
Oracle tutorial : Pivot In Oracle PL SQL This tutorial will explain you how to use PIVOT clause in oracle. It will show you how oracle convert rows to columns dynamically oracle pivot multiple columns example of pivot table #techquerypond https://techquerypond.com https://techquerypond.wordpress.com https://twitter.com/techquerypond
Views: 4268 Tech Query Pond
SQL Magic: Dynamic Pivot, Polymorphic Table Functions and More
 
32:18
In October's session, Chris Saxon covered SQL magic, including the following highlights: - 0:50 - how to find table name for index (sub)partitons from *_ind_(sub)partitions - 2:00 - SQL Magic! the dynamic pivot update; converting rows & columns in a table via an update statement - 8:30 - Polymorphic table functions; the describe function & fetch_rows procedure; PTFs and the optimizer; examples on LiveSQL.oracle.com. AskTOM Office Hours offers free, monthly training and tips on how to make the most of Oracle Database, from Oracle product managers, developers and evangelists. Music by bensound.com https://asktom.oracle.com/ Oracle Developers portal: https://developer.oracle.com/ Sign up for an Oracle Cloud trial: https://cloud.oracle.com/en_US/tryit Music by bensound.com
Views: 221 Oracle Developers
How to use the Oracle SQL PIVOT Clause
 
11:46
PIVOT allows you to "flip a table on its side", i.e. Columns to Rows / Rows to Columns. Previously we did this with DECODE or CASE. As of Oracle 11g, Oracle Database includes the PIVOT clause (and UNPIVOT). Oracle expert Geoff Wiland from SkillBuilders will demonstrate PIVOT, UNPIVOT, including the use of aggregate functions.
Views: 9711 SkillBuilders
SQL Server Programming Part 18 - Dynamic Pivot Tables
 
13:08
If you'd like to help fund Wise Owl's conversion of tea and biscuits into quality training videos you can click this link https://www.wiseowl.co.uk/donate?t=1 to make a donation. Thanks for watching! By Andrew Gould https://www.wiseowl.co.uk - The most annoying part of creating a pivot table in Microsoft SQL Server is listing out the column headings for the table. This video explains how to use dynamic SQL so that you no longer have to repeat this laborious task. The video includes a quick recap of basic pivot tables, how to use the QuoteName function to generate a list of column headings, how to build an SQL statement and store it as a string of text and, finally, how to execute the dynamic SQL string. You can download the script to create the Movies database used in this video at the following link: https://www.wiseowl.co.uk/files/execise-question-files/qf-898.zip You can view a written version of this tutorial at: https://www.wiseowl.co.uk/blog/s417/pivoting-sql-data.htm You can see the range of resources and courses we offer in SQL Server here: https://www.wiseowl.co.uk/sql/ Visit www.wiseowl.co.uk for more online training resources in Microsoft Excel, Microsoft Access, Microsoft PowerPoint, Microsoft Word, Microsoft Project, Microsoft Publisher, Microsoft Visio, SQL Server, Reporting Services, Analysis Services, Visual Studio, ASP.NET, VB.NET, C# and more!
Views: 40508 WiseOwlTutorials
Oracle EBS User Assignments Dynamic Pivot Table Dashboard
 
05:04
Learn how to create dynamic pivot tables from Oracle E-Business Suite. This tutorial, that I presented at Collaborate 2016, shows a User Assignments Dashboard that you can export to MS Excel
PL/SQL tutorial 82: How to Execute DDL statements with Execute Immediate Dynamic SQL
 
10:32
Native Dynamic SQL - Learn how to execute CREATE TABLE DDL statement using EXECUTE IMMEDIATE in Oracle Database by Manish Sharma ------------------------------------------------------------------------ ►►►LINKS◄◄◄ Blog: http://bit.ly/NDS-3 What Is A #Data Warehouse? http://bit.ly/the-data-warehouse Previous Tutorial ► Introduction to Dynamic SQL: https://youtu.be/Yzk1zENbhg4 ► Introduction to Execute Immediately: https://youtu.be/47KzYVBNbIs ► Create Table: https://youtu.be/UU0EEfpa-2c ►Alter Table: https://youtu.be/8yAaO_ySTkw ------------------------------------------------------------------------- ►Make sure you SUBSCRIBE and be the 1st one to see my videos! ------------------------------------------------------------------------- ►►►Find me on Social Media◄◄◄ Follow What I am up to as it happens on https://twitter.com/rebellionrider http://instagram.com/rebellionrider https://plus.google.com/+Rebellionrider http://in.linkedin.com/in/mannbhardwaj/ ___Facebook Official Page of Manish Sharma___ https://www.facebook.com/TheRebellionRider/ ___Facebook Official Page of RebellionRider.com___ https://www.facebook.com/RebellionRider.official/ You can also Email me at for E-mail address please check the About section Please please LIKE and SHARE my videos it makes me happy. Thanks for liking, commenting, sharing and watching more of our videos This is Manish from RebellionRider.com ♥ I LOVE ALL MY VIEWERS AND SUBSCRIBERS
Views: 3061 Manish Sharma
DYN1: Introduction to Dynamic SQL in PL/SQL (PL/SQL Channel)
 
14:32
This video explains the difference between static and dynamic SQL, reviews the four methods of dynamic SQL, and lays out the plan for this series. It was taken from PLSQLChannel.com, originally recorded before Steven Feuerstein re-joined Oracle in March 2014. ======================================== Practically Perfect PL/SQL with Steven Feuerstein Copyright © 2015 Oracle and/or its affiliates. Oracle is a registered trademark of Oracle and/or its affiliates. All rights reserved. Other names may be registered trademarks of their respective owners. Oracle disclaims any warranties or representations as to the accuracy or completeness of this recording, demonstration, and/or written materials (the “Materials”). The Materials are provided “as is” without any warranty of any kind, either express or implied, including without limitation warranties or merchantability, fitness for a particular purpose, and non-infringement.
DYN6: Method 4 dynamic SQL with DBMS_SQL (PL/SQL Channel)
 
25:48
When you don't know the number of columns you are selecting or the number of placeholders that need binding, you are faced with method 4 dynamic SQL. And the solution to this very generic scenario is the DBMS_SQL package. This video was taken from PLSQLChannel.com, originally recorded before Steven Feuerstein re-joined Oracle in March 2014. ======================================== Practically Perfect PL/SQL with Steven Feuerstein Copyright © 2015 Oracle and/or its affiliates. Oracle is a registered trademark of Oracle and/or its affiliates. All rights reserved. Other names may be registered trademarks of their respective owners. Oracle disclaims any warranties or representations as to the accuracy or completeness of this recording, demonstration, and/or written materials (the “Materials”). The Materials are provided “as is” without any warranty of any kind, either express or implied, including without limitation warranties or merchantability, fitness for a particular purpose, and non-infringement.
Oracle Coherence Pivot Tables
 
25:39
This presentation is based on Jonathan Knight's excellent blog article (http://thegridman.com/coherence/oracle-coherence-pivot-table-queries/) on the same subject. Here he will elaborate on this article and talk further about how Oracle Coherence can be used to perform pivot-table like queries using the Coherence GroupAggregator.
Views: 1352 OracleCoherence
How to use Pivot and Unpivot? (how to change rows to column and column to rows)
 
10:47
This is a video tutorial on using pivot and unpivot operators to change rows to column and columns to rows when needed, the video also demonstrates a way to change from rows to column without using the pivot operator which can be helpful if you are using and older version of oracle or some other database without the feature of pivot and unpivot. Both the operators are explained with an example for better understanding
Views: 6477 Kishan Mashru
Oracle XML Publisher - Cross Tab - Pivot Table Report
 
08:23
Oracle XML Publisher - Cross Tab - Pivot Table Report
Views: 3408 Lead Technologies
TSQL: How To Build A Dynamic Pivot Table
 
04:40
Building Pivot Tables: https://www.youtube.com/watch?v=EoJS0m2R1u8 Group Items By Comma Separation: https://www.youtube.com/watch?v=ylF6sqbOoLQ
Views: 8343 SQLInSix Minutes
SQL AND PLSQL INTERVIEW 12-PIVOT FUNCTION(change rows data to column data?
 
03:21
If You have Any Queries Comment Me in Comment Box or MY WHATSUP NUMBER 08508598428. Subscribe this Youtube Channel for Upcomming Videos. join My facebook Sql and PLSQL Discussion Page https://www.facebook.com/Oracle-SQL-PLSQL-Practical-Discussion-334342290310499/
Views: 208 Manikandan R
Dynamically Pivot Data in SQL Server
 
13:50
In this video we will write T-SQL in SQL Server to build a dynamic query that will pivot a data set. Watch the video and get the code here: https://anthonysmoak.com/2018/08/05/how-to-dynamically-pivot-data-in-sql-server/
Views: 350 Anthony B. Smoak
How to transpose column to row in sql
 
12:43
Hi friends today we will learn how to transpose column data into row of table.Oracle database Unbeatable,Unbreakable Platform..
Views: 14832 Oracle World
Dynamic sql table name variable
 
11:59
Text version of the video http://csharp-video-tutorials.blogspot.com/2017/04/dynamic-sql-table-name-variable.html Slides http://csharp-video-tutorials.blogspot.com/2017/04/dynamic-sql-table-name-variable_20.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 SQL Server Tutorial Videos https://www.youtube.com/playlist?list=PL08903FB7ACA1C2FB 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 In this video we will discuss how to pass table name dynamically for stored procedure in sql server. This is one of the sql questions that is very commonly asked. I have a web page with a textbox. When I enter a table name in the textbox and when I click "Load Data" button, we want to retrieve data from that respective table and display it on the page. Copy the SQL Script to create the tables from my blog using the link below http://csharp-video-tutorials.blogspot.com/2017/04/dynamic-sql-table-name-variable.html Create the following stored procedure. Notice we are passing table name as a parameter to the stored prcoedure. In the body of the stored procedure we are concatenating strings to build our dynamic sql statement. In our previous videos we discussed that this open doors for SQL injection. Create procedure spDynamicTableName @TableName nvarchar(100) As Begin Declare @sql nvarchar(max) Set @sql = 'Select * from ' + @TableName Execute sp_executesql @sql End So the obvious question that comes to our mind is, why are we not creating parameterised sql statement instead. The answers is we can't. SQL Server does not allow table names and column names to be passed as parameters. Notice in the example below, we are creating a parameterised query with @TabName as a parameter. When we execute the following code, the procedure gets created successfully. Create procedure spDynamicTableName1 @TableName nvarchar(100) As Begin Declare @sql nvarchar(max) Set @sql = 'Select * from @TabName' Execute sp_executesql @sql, N'@TabName nvarchar(100)', @TabName = @TableName End But when we try to execute it we get an error - Must declare the table variable "@TabName" Execute spDynamicTableName1 N'Countries' Add a Web Page to the project that we have been working with in our previous video. Name it "DynamicTableName.aspx". Copy and paste the HTML from my blog using the link below http://csharp-video-tutorials.blogspot.com/2017/04/dynamic-sql-table-name-variable.html Copy and paste the code from my blog in the code-behind page http://csharp-video-tutorials.blogspot.com/2017/04/dynamic-sql-table-name-variable.html At this point, run the application and type the following text in the "Table Name" textbox and click "Load Data" button. Notice "SalesDB" database is dropped. Our application is prone to SQL injection as we have implemented dynamic sql in our stored procedure by concatenating strings instead of using parameters. Employees; Drop database SalesDB One way to prevent SQL injection in this case is by using SQL Server built-in function - QUOTENAME(). We will discuss QUOTENAME() function in detail in our next video. For now understand that by default, this function wraps that string that is passed to it in a pair of brackets. SELECT QUOTENAME('Employees') returns [Employees] Modify the stored procedure to use QUOTENAME() function as shown below. Alter procedure spDynamicTableName @TableName nvarchar(100) As Begin Declare @sql nvarchar(max) Set @sql = 'Select * from ' + QUOTENAME(@TableName) Execute sp_executesql @sql End At this point, type the following text in the "Table Name" textbox and click "Load Data" button. Notice you will see a message - Invalid object name 'Employees; Drop database SalesDB'. Also "SalesDB" database is not dropped. Employees; Drop database SalesDB The entire text in "Table Name" textbox is wrapped in a pair of brackets by the QUOTENAME function and is treated as table name. Since we do have a table with the specified name, we get the error - Invalid object name.
Views: 21082 kudvenkat
PIVOT and UNPIVOT Operators in Oracle Database 11g
 
03:03
A quick example of using the PIVOT and UNPIVOT operators introduced in Oracle Database 11g. For more information see: https://oracle-base.com/articles/11g/pivot-and-unpivot-operators-11gr1 Website: https://oracle-base.com Blog: https://oracle-base.com/blog Twitter: https://twitter.com/oraclebase Cameo by Moans Norgaard Blog: http://wedonotuse.blogspot.co.uk/ Twitter: https://twitter.com/mnorgaard Cameo appearances are for fun, not an endorsement of the content of this video.
Views: 8875 ORACLE-BASE.com
Tutorial : Report with Dynamic Query.
 
13:28
The videos is about a very important and powerful feature of oracle apex. The video shows how to create a report with dynamically generated SQL query.
Views: 7142 Oracle Testlab
Pivot & Unpivot: Databases for Developers #14
 
07:24
Sometimes you want to convert rows to columns. Or convert columns back into rows. Luckily SQL has two clauses to help you do this: PIVOT & UNPIVOT Using these you can easily transform your rows to columns and back again. Want more? Take the course: https://devgym.oracle.com/pls/apex/dg/class/databases-for-developers-next-level.html Read the blog post: https://blogs.oracle.com/sql/how-to-convert-rows-to-columns-and-back-again-with-sql-aka-pivot-and-unpivot Read the docs: PIVOT: https://docs.oracle.com/en/database/oracle/oracle-database/18/dwhsg/sql-analysis-reporting-data-warehouses.html#GUID-05BB22CD-0F53-4C90-AE84-CE3F88DBD591 UNPIVOT: https://docs.oracle.com/en/database/oracle/oracle-database/18/dwhsg/sql-analysis-reporting-data-warehouses.html#GUID-B0AC9284-DDC1-4EF7-84CD-A27DF7F8DD57 Need help with SQL? Ask us over on AskTOM: https://asktom.oracle.com Twitter: https://twitter.com/ChrisRSaxon Daily SQL Twitter tips: https://twitter.com/SQLDaily All Things SQL blog: https://blogs.oracle.com/sql/ ============================ The Magic of SQL with Chris Saxon Copyright © 2015 Oracle and/or its affiliates. Oracle is a registered trademark of Oracle and/or its affiliates. All rights reserved. Other names may be registered trademarks of their respective owners. Oracle disclaims any warranties or representations as to the accuracy or completeness of this recording, demonstration, and/or written materials (the “Materials”). The Materials are provided “as is” without any warranty of any kind, either express or implied, including without limitation warranties or merchantability, fitness for a particular purpose, and non-infringement.
Views: 929 The Magic of SQL
Oracle 11G Tutorial | Dynamic SQL | InfiniteSkills Training
 
07:20
Want all of our free Oracle videos? Download our free iPad app at http://itunes.apple.com/us/app/video-training-courses-from/id418130423?mt=8 http://www.infiniteskills.com/training/learning-oracle-database-11g.html Oracle trainer Lewis Cunningham offers professional tips on Dynamic SQL in this hands-on tutorial from InfiniteSkills. More free content can be found on the product page for the 8-hour 11g course. YouTube: https://www.youtube.com/user/OreillyMedia Facebook: https://www.facebook.com/OReilly/?fref=ts Twitter: https://twitter.com/OReillyMedia Website: http://www.oreilly.com/
Part 6   Transform rows into columns in sql server
 
08:53
Link for all dot net and sql server video tutorial playlists http://www.youtube.com/user/kudvenkat/playlists Link for slides, code samples and text version of the video http://csharp-video-tutorials.blogspot.com/2014/06/part-6-transform-rows-into-columns-in.html This is another common sql server interview question. We will be using Countries table in this example. SQL to create the table Create Table Countries ( Country nvarchar(50), City nvarchar(50) ) GO Insert into Countries values ('USA','New York') Insert into Countries values ('USA','Houston') Insert into Countries values ('USA','Dallas') Insert into Countries values ('India','Hyderabad') Insert into Countries values ('India','Bangalore') Insert into Countries values ('India','New Delhi') Insert into Countries values ('UK','London') Insert into Countries values ('UK','Birmingham') Insert into Countries values ('UK','Manchester') Here is the interview question. Write a sql query to transpose rows to columns. Using PIVOT operator we can very easily transform rows to columns. Select Country, City1, City2, City3 From ( Select Country, City, 'City'+ cast(row_number() over(partition by Country order by Country) as varchar(10)) ColumnSequence from Countries ) Temp pivot ( max(City) for ColumnSequence in (City1, City2, City3) ) Piv
Views: 179575 kudvenkat
Generating matrix using SQL queries using CUBE, PIVOT and ROLLUP
 
11:34
Generating matrix in SQL is bit tricky, in above lecture you will learn to generate matrix using CUBE and PIVOT, also difference between CUBE and ROLLUP. For downloading script follow link below: http://www.techsapphire.in/index/generating_matrix_using_sql_queries_using_cube_pivot_and_rollup/0-174
Views: 4058 techsapphire
PL/SQL: Dynamic SQL part-1
 
06:51
In this tutorial, you'll learn what is dynamic SQL and how to implement it..
Views: 22130 radhikaravikumar
SQL Server Programming Part 17 - The Pivot Operator
 
13:54
If you'd like to help fund Wise Owl's conversion of tea and biscuits into quality training videos you can click this link https://www.wiseowl.co.uk/donate?t=1 to make a donation. Thanks for watching! By Andrew Gould https://www.wiseowl.co.uk - The Pivot Operator in Microsoft SQL Server allows you to group data by columns, as well as by rows, to create simple static pivot tables. This video teaches you how to use the pivot operator including how to apply aggregate functions and, importantly, a quick method for listing out the column headings of your pivot table using the QuoteName function. You can download the script to create the Movies database used in this video at the following link: https://www.wiseowl.co.uk/files/execise-question-files/qf-898.zip You can view a written version of this tutorial at: https://www.wiseowl.co.uk/blog/s417/pivoting-sql-data.htm You can see the range of resources and courses we offer in SQL Server here: https://www.wiseowl.co.uk/sql/ Visit www.wiseowl.co.uk for more online training resources in Microsoft Excel, Microsoft Access, Microsoft PowerPoint, Microsoft Word, Microsoft Project, Microsoft Publisher, Microsoft Visio, SQL Server, Reporting Services, Analysis Services, Visual Studio, ASP.NET, VB.NET, C# and more!
Views: 39060 WiseOwlTutorials
Shawn Price Details Oracle's Pivot to the Cloud
 
01:14:57
Shawn Price, SVP Oracle Global Cloud, discusses how you can benefit by joining Oracle’s pivot to the Cloud. See how you can achieve decades-long market advantage by transforming your enterprise functions and infrastructure to the cloud.
Views: 939 OracleOpenWorld
TSQL: Building Pivot Tables
 
09:16
An example of how to build a Pivot table and how they can be useful.
Views: 11476 SQLInSix Minutes
SQL 2008 series: SQL Pivot / SQL Dynamic Query
 
06:33
http://www.creativecommit.com This demo gives a brief overview of SQL pivot and constructing dynamic queries
Views: 10269 creativecommIT
How to Pivot (Flip) Tables with SQL CASE & DECODE
 
04:25
Pivoting tables (columns to rows, rows to columns) is a common data analysis requirement. Learn how to accomplish this with Oracle SQL CASE and DECODE
Views: 1599 SkillBuilders
SQL Server  Generating Cross Tab Tables (Pivot)
 
07:39
6. Generating Cross Tab Tables (Pivot)
Views: 17060 Eagle
Função Oracle PIVOT
 
08:24
Acesse o desafio: http://novidades.aprendaplsql.com/15-dias-de-funcoes-oracle A função PIVOT cria uma matriz de informações conforme as necessidades do usuário. SELECT e.manager_id, e.department_id, count(e.employee_id) FROM hr.employees e GROUP BY e.manager_id, e.department_id ORDER BY e.manager_id, e.department_id; SELECT * FROM (SELECT manager_id, department_id, employee_id FROM hr.employees ) PIVOT ( COUNT(employee_id) FOR department_id IN (10, 20, 30, 50, 60, 80, 90) ) ORDER BY manager_id SELECT e.manager_id, d.department_name, count(e.employee_id) FROM hr.employees e INNER JOIN hr.departments d ON e.department_id = d.department_id GROUP BY e.manager_id, d.department_name ORDER BY e.manager_id, d.department_name; WITH valores_pivot AS ( SELECT e.manager_id manager_id, d.department_name department_name, e.employee_id qtd_empregados FROM hr.employees e INNER JOIN hr.departments d ON e.department_id = d.department_id ) SELECT * FROM valores_pivot PIVOT ( COUNT(qtd_empregados) FOR department_name IN ('IT', 'Administration', 'Executive', 'Marketing', 'Purchasing', 'Sales', 'Shipping') ) ORDER BY manager_id; Funções Oracle: https://www.youtube.com/playlist?list=PLMaqczuL07LkjrX6Rvx6TdNM-1nbUKG8p
Views: 2084 Aprenda PL/SQL
Pivot in sql server 2008   Part 54
 
12:25
In this video we will learn about pivot operator. Pivot is a sql server operator that can be used to turn unique values from one column, into multiple columns in the output, there by effectively rotating a table. Text version of the video http://csharp-video-tutorials.blogspot.com/2012/10/pivot-operator-in-sql-server-part-54.html Slides http://csharp-video-tutorials.blogspot.com/2013/09/part-54-pivot-in-sql-server-2008.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
Views: 173894 kudvenkat
MS SQL Server Pivot Multiple Columns
 
06:33
MS SQL Server pivot multiple columns data example table query
Views: 643 Saidah Faulia
UNPIVOT in SQL Server
 
04:33
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. 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
Views: 41732 kudvenkat
SQL PIVOT Tutorial
 
02:04
SQL PIVOT Tutorial - Oracle 11g
Views: 1982 Niki Singh
Pivot Table and its advanced properties in OBIEE 11g and 12C
 
08:22
This video shows you advanced properties of pivot table in obiee 11g and obiee 12c
SQL Tutorial - PIVOT
 
13:11
Another video brought to you by BeardedDev, bringing you tutorials on Business Intelligence, SQL Programming and Data Analysis. In this video I talk about using PIVOT in Microsoft SQL Server. Using PIVOT allows us rotate data from rows to columns making the data more readable. PIVOT is ideal for reporting in SQL Server and can be used as a starting point to visualise trends. In this PIVOT tutorial I demonstrate the difference between how data is presented compared to GROUP BY. PIVOT Syntax SELECT [columns] FROM ( [source_query] ) PIVOT ( [aggr_function]([aggr_column] FOR [spreading_column] IN ([spreading_elements])) SQL Queries in the video: Results using GROUP BY statement SELECT Sales_Customer_Id , DATENAME(MONTH, Sales_Date) AS [Month] , Sales_Amount FROM dbo.Sales GROUP BY Sales_Customer_Id , DATENAME(MONTH, Sales_Date) Results using PIVOT statement SELECT Sales_Customer_Id , [January] , [February] , [March] FROM ( SELECT Sales_Customer_Id , DATENAME(MONTH, Sales_Date) AS [Month] , Sales_Amount FROM dbo.Sales ) AS Src PIVOT ( SUM(Sales_Amount) FOR [Month] IN ([January], [February], [March]) ) AS Pvt Alternative PIVOT statement SELECT [Month] , [1] , [2] , [3] , [4] , [5] , [6] , [7] , [8] FROM ( SELECT Sales_Customer_Id , DATENAME(MONTH, Sales_Date) AS [Month] , Sales_Amount FROM dbo.Sales ) AS Src PIVOT ( SUM(Sales_Amount) FOR Sales_Customer_Id IN ([1], [2], [3], [4], [5], [6], [7], [8]) ) AS Pvt Please feel free to post comments.
Views: 673 BeardedDev
PL/SQL Tutorial: EXECUTE IMMEDIATE   Native Dynamic SQL
 
03:51
PL/SQL Tutorial: EXECUTE IMMEDIATE Native Dynamic SQL SQL Tutorial SQL Tutorial for beginners PLSQL Tutorial PLSQL Tutorial for beginners PL/SQL Tutorial PL SQL Tutorial PL SQL Tutorial for beginners PL/SQL Tutorial for beginners Oracle SQL Tutorial
Views: 216 TechLake
Funcion Pivot ejeutandola dentro de un Query Dinamico
 
16:01
Función Pivot ejeutandola dentro de un Query Dinamico
Views: 2685 visoalgt
Changing calculation logic based on a column
 
06:39
This video demonstrated how to change the logic of a given row calculation based on the value in another column. You may run in to a scenerion where you need to implement this when you have a requirement that the rows with one dimension value have logic "X" (for instance Mean) and the the rows with a different dimension value have logic "Y" (for instance a Median) assigned. This is accomplished with the Switch (Case) expression in the OBIEE formula builder.
Views: 7534 Justin W. Steigerwalt
Pivot Table and its properties in OBIEE 11g and 12C
 
05:20
This videos shows you how to create pivot table in OBIEE 11g and 12C and its properties explanation Visit www.obieepublisher.blogspot.com for more details.
KISS series on Analytics: 27  PIVOT and UNPIVOT
 
05:30
Welcome to the KISS video series. Solving problems that typically required complicated SQL in the past, that can now be easily solved with Analytic SQL syntax. We are now looking at functions that are not specifically analytics, but they are present in the Data Warehousing Guide in the SQL for Analysi s chapter. In this session we look at how to transpose rows to columns, and columns to rows, using PIVOT and UNPIVOT. Script: https://livesql.oracle.com/apex/livesql/file/content_DCC032IJONO8467JXDM2X9I7T.html Watch the entire Analytics playlist at https://www.youtube.com/playlist?list=PLJMaoEWvHwFJDyhMLCkNSSUQWw9waFkIj ========================================­­­­============== Copyright © 2015 Oracle and/or its affiliates. Oracle is a registered trademark of Oracle and/or its affiliates. All rights reserved. Other names may be registered trademarks of their respective owners. Oracle disclaims any warranties or representations as to the accuracy or completeness of this recording, demonstration, and/or written materials (the “Materials”). The Materials are provided “as is” without any warranty of any kind, either express or implied, including without limitation warranties or merchantability, fitness for a particular purpose, and non-infringement.
Views: 674 Connor McDonald
How to Convert Rows into Columns in Oracle | Oracle | Oracle Tutorials
 
01:58
Converting rows into Columns. Transpose rows in to columns.
Dynamic SQL in SQL Server
 
12:12
Text version of the video http://csharp-video-tutorials.blogspot.com/2017/03/dynamic-sql-in-sql-server.html Slides http://csharp-video-tutorials.blogspot.com/2017/03/dynamic-sql-in-sql-server_27.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 SQL Server Tutorial Videos https://www.youtube.com/playlist?list=PL08903FB7ACA1C2FB 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 In this video we will discuss 1. What is Dynamic SQL 2. Simple example of using Dynamic SQL What is Dynamic SQL Dynamic SQL is a SQL built from strings at runtime. Simple example of using Dynamic SQL Here is the SQL Script to create Employees table and populate it with data Create table Employees ( ID int primary key identity, FirstName nvarchar(50), LastName nvarchar(50), Gender nvarchar(50), Salary int ) Go Insert into Employees values ('Mark', 'Hastings', 'Male', 60000) Insert into Employees values ('Steve', 'Pound', 'Male', 45000) Insert into Employees values ('Ben', 'Hoskins', 'Male', 70000) Insert into Employees values ('Philip', 'Hastings', 'Male', 45000) Insert into Employees values ('Mary', 'Lambeth', 'Female', 30000) Insert into Employees values ('Valarie', 'Vikings', 'Female', 35000) Insert into Employees values ('John', 'Stanmore', 'Male', 80000) Go One way to achieve this is by implementing a stored procedure as shown below that this page would call. Create Procedure spSearchEmployees @FirstName nvarchar(100), @LastName nvarchar(100), @Gender nvarchar(50), @Salary int As Begin Select * from Employees where (FirstName = @FirstName OR @FirstName IS NULL) AND (LastName = @LastName OR @LastName IS NULL) AND (Gender = @Gender OR @Gender IS NULL) AND (Salary = @Salary OR @Salary IS NULL) End Go The stored procedure in this case is not very complicated as we have only 4 search filters. What if there are 20 or more such filters. This stored procedure can get complex. To make things worse what if we want to specify conditions like AND, OR etc between these search filters. The stored procedure can get extremely large, complicated and difficult to maintain. One way to reduce the complexity is by using dynamic SQL as show below. Depending on for which search filters the user has provided the values on the "Search Page", we build the WHERE clause dynamically at runtime, which can reduce complexity. However, you might hear arguments that dynamic sql is bad both in-terms of security and performance. This is true if the dynamic sql is not properly implemented. From a security standpoint, it may open doors for SQL injection attack and from a performance standpoint, the cached query plans may not be reused. If properly implemented, we will not have these problems with dynamic sql. In our upcoming videos, we will discuss good and bad dynamic sql implementations. For now let's implement a simple example that makes use of dynamic sql. In the example below we are assuming the user has supplied values only for FirstName and LastName search fields. To execute the dynamicl sql we are using system stored procedure sp_executesql. sp_executesql takes two pre-defined parameters and any number of user-defined parameters. @statement - The is the first parameter which is mandatory, and contains the SQL statements to execute @params - This is the second parameter and is optional. This is used to declare parameters specified in @statement The rest of the parameters are the parameters that you declared in @params, and you pass them as you pass parameters to a stored procedure Declare @sql nvarchar(1000) Declare @params nvarchar(1000) Set @sql = 'Select * from Employees where [email protected] and [email protected]' Set @params = '@FirstName nvarchar(100), @LastName nvarchar(100)' Execute sp_executesql @sql, @params, @FirstName='Ben',@LastName='Hoskins' This is just the introduction to dynamic SQL. If a few things are unclear at the moment, don't worry. In our upcoming videos we will discuss the following 1. Implementing a real world "Search Web Page" with and without dynamic SQL 2. Performance and Security implications of dynamic sql. Along the way we will also discuss good and bad dynamic sql implementations. 3. Different options available for executing dynamic sql and their implications 4. Using dynamic sql in stored procedures and it's implications Once we discuss all the above, you will understand 1. The flexibility dynamic sql provides 2. Advantages and disadvantages of dynamic sql 3. When and when not to use dynamic sql
Views: 35591 kudvenkat

Nyu admissions essay 2012
Resume cover letter example australian
Examples of cover letter for finance jobs
Essay writing service best
I am writing to complain about the service you