Imagine you have a table as shown below:
----------------------------------------------
EmpName Post City
---------------------------------------------
Ravi Manager Newyark
peter Worker London
Ram Manager Newyark
--------------------------------------------
If you are able to get a report as shown below, then it is Pivot table:
-------------------------------------------------
City Manager Worker
------------------------------------------------
Newyark 2 0
London 0 1
-----------------------------------
That is, values in the rows (such as Manager,worker) have become the FIELD NAMES.
Then it will be called as Pivot Table.
How this can be achieved in oracle sql :
SELECT CITY, SUM(CASE POST WHEN 'Manager' THEN 1 ELSE 0 END) AS 'MANAGER',
SUM(CASE POST WHEN 'Worker' THEN 1 ELSE 0 END) AS 'WORKER'
From EMP
GROUP BY CITY;
Contents In this Site
- actionscripts
- ASP Code-PhoneBook
- asp code-what you want to do model
- asp-insert-edit-del-in-one
- ASP.NET AT SYMBOL
- asp.net Oracle Connetivity
- DAP
- Google Map
- Home
- IP Address Qns
- Javascript:Close a window
- LAN VLAN Notes (Personal)
- Learn SDH
- Lifestyle
- Listener Control
- MANYCAM
- Mini Story-Send him to IIM
- Modem Config
- old asp: connection strings
- old asp: scriping
- ORACLE - PIVOT TABLE
- ORACLE- Database vs instance
- ORACLE-CREATE TABLE
- Photo - You show me first
- Russian Beauties
- SARDARJI CARTOONS
- spider man
- Thrisha Bath
- vb for beginner
- vb.net notes for my personal use
- xml basics
- XSS
Thank you spending your time here.
If possible you; can leave some comments or suggestions. Thanks a lot once again. |
||
| ||
Disclaimer and Copy Right |