How to view the line of columns without using the pivot keyword
Hellocould someone help me how to display lines in columns without using the keyword pivot and actuall is my scenario, iam having two tables with names and examples of data is shown below
MIDDLE MINAME TASKID TASKNAME IDENTIFICATION PROJECT
1 PROJ1 1 AA 100 PR1_TASK1
1 PROJ1 3 CC PR1_TASK3 102
1 PROJ1 DD 4 103 PR1_TASK4
1 PROJ1 EE 5 104 PR1_TASK5
1 PROJ1 6 105 FF PR1_TASK6
2 PROJ2 EE 5 114 PR2_TASK1
2 PROJ2 6 115 FF PR2_TASK2
2 PROJ2 GG 7 116 PR2_TASK3
2 PROJ2 HH 8 117 PR2_TASK4
2 PROJ2 9 118 PR2_TASK5 JJ
2 PROJ2 KK 10 119 PR2_TASK6
2 PROJ2 1 AA PR2_TASK7 120
The output should show the project and County of tasks at a given stage as shown below
project AA BB CC DD EE FF GG HH JJ KK
1 2 0 1 5 3 2 0 2 1 0
2 1 2 0 2 1 0 2 4 3 1
Thanks in advance,
VVR
CREATE TABLE pivot_test (
ID NUMBER,
PROJECT VARCHAR2(10),
MID NUMBER,
MINAME VARCHAR2(5),
TASKID NUMBER,
TASKNAME VARCHAR2(10)
);
INSERT INTO pivot_test VALUES (1, 'PROJ1', 1, 'AA', 100, 'PR1_TASK1');
INSERT INTO pivot_test VALUES (1, 'PROJ1', 3, 'CC', 102, 'PR1_TASK3');
INSERT INTO pivot_test VALUES (1, 'PROJ1', 4, 'DD', 103, 'PR1_TASK4');
INSERT INTO pivot_test VALUES (1, 'PROJ1', 5, 'EE', 104, 'PR1_TASK5');
INSERT INTO pivot_test VALUES (1, 'PROJ1', 6, 'FF', 105, 'PR1_TASK6');
INSERT INTO pivot_test VALUES (2, 'PROJ2', 5, 'EE', 114, 'PR2_TASK1');
INSERT INTO pivot_test VALUES (2, 'PROJ2', 6, 'FF', 115, 'PR2_TASK2');
INSERT INTO pivot_test VALUES (2, 'PROJ2', 7, 'GG', 116, 'PR2_TASK3');
INSERT INTO pivot_test VALUES (2, 'PROJ2', 8, 'HH', 117, 'PR2_TASK4');
INSERT INTO pivot_test VALUES (2, 'PROJ2', 9, 'JJ', 118, 'PR2_TASK5');
INSERT INTO pivot_test VALUES (2, 'PROJ2', 10, 'KK', 119, 'PR2_TASK6');
INSERT INTO pivot_test VALUES (2, 'PROJ2', 1, 'AA', 120, 'PR2_TASK7');
SELECT ID as PROJECT,
SUM(DECODE(miname, 'AA', 1, 0)) AS AA,
SUM(DECODE(miname, 'BB', 1, 0)) AS BB,
SUM(DECODE(miname, 'CC', 1, 0)) AS CC,
SUM(DECODE(miname, 'DD', 1, 0)) AS DD,
SUM(DECODE(miname, 'EE', 1, 0)) AS EE,
SUM(DECODE(miname, 'FF', 1, 0)) AS FF,
SUM(DECODE(miname, 'GG', 1, 0)) AS GG,
SUM(DECODE(miname, 'HH', 1, 0)) AS HH,
SUM(DECODE(miname, 'JJ', 1, 0)) AS JJ,
SUM(DECODE(miname, 'KK', 1, 0)) AS KK
FROM pivot_test
GROUP BY ID;
PROJECT AA BB CC DD EE FF GG HH JJ KK
------- -- -- -- -- -- -- -- -- -- --
1 1 0 1 1 1 1 0 0 0 0
2 1 0 0 0 1 1 1 1 1 1
Tags: Database
Similar Questions
-
I have the table of 3 columns A, B, C. I want to store the sum of columns A B in the C column without using the DML statements. Can anyone help please how to do. ?
11.1 and especially you have virtual column
SQL> create table t 2 ( 3 a number 4 , b number 5 , c generated always as (a+b) virtual 6 ); Table created. SQL> insert into t (a, b) values (1, 2); 1 row created. SQL> select * from t; A B C ---------- ---------- ---------- 1 2 3
Before that, a front insert - trigger
SQL> create table t 2 ( 3 a number 4 , b number 5 , c number 6 ); Table created. SQL> create or replace trigger t_default before insert on t for each row 2 begin 3 :new.c := :new.a+:new.b; 4 end; 5 / Trigger created. SQL> insert into t (a, b) values (1, 2); 1 row created. SQL> select * from t; A B C ---------- ---------- ---------- 1 2 3
-
How to view the report by using the style of calendar in obiee
Hello
Can someone tell me how to view the report as the calendar?
When I choose chrystelle, it displays 31 days. 7 column, from Sunday to Saturday, and each cell displays the detailed information, such as sales from today!
Thank you!Hello
Please foloww the below blog...
http://bischool.WordPress.com/2010/10/22/calendar-view-in-OBIEE-and-applications/
Thank you
Vincent -
How to view the monthly/annual statistics in terms of time past/calories burned, broken down by each individual activity such as run elliptical/outside etc. Y at - it a third party application that can help me to collect and display these data?
Hello
It is not currently possible to review the data the application integrated in activity or training on this basis. If you want Apple to consider adding this feature, you can suggest here:
https://www.Apple.com/feedback/watch.html
However, health and fitness data from other sources, iPhone, and Apple Watch are registered and grouped within the health on iPhone app. These data can be exported, which you may find useful to track the cumulative progress and/or analyze your activity more in detail.
IPhone app activity also has a button for sharing (top right of the screen) that allows to share data - including social media, Messages, Mail, Notes, and a printer.
Include third-party applications that can be useful, for example:
Access to QS
-"Access your HealthKit data in a table so you can Explorer using numbers, Excel, R, or any other tool compatible CSV."
- https://itunes.apple.com/gb/app/qs-access/id920297614?mt=8
SpectaRun workouts
-"View from the workouts of your Apple Watch on your iPhone and to export these workouts so you can download them to your favorite online running community."
- https://itunes.apple.com/gb/app/spectarun-workouts/id991723862?mt=8
Data can also be exported directly from the application of the health (Health Data > All - Share at the top button on the right).
Check the descriptions and support resources for third party applications for supported details of import and data analysis features.
More information:
Use the activity on your Apple Watch - Apple Support
-
How to view the PSA screenshot on front panel
Anyone know how to view the screenshot of the specturm Analyzer the PSA series on the façade. I can put the JPEG file in the C drive, but I can not display on the front panel. Please see my labview code.
Thank you, very good information
-
How to view the songs that were on the "rocket" using windows Explorer?
How to view the songs that were on the "rocket" when buying using windows Explorer?
Do you need the list or do you need knowledge where they are? If you are looking for the list just look for the Board of Directors. If you are looking for them on the "rocket" you must be connected in MTP Mode.
-
How to view the application menu in the app?
Hi all
Does anyone know how to view the application menu in the app?
The ultimate effect is that when you see the user swipe down from the top of the screen, the menu of the application.Thank you very much.
Please check the recent threads or duplicate search before posting questions: http://supportforums.blackberry.com/t5/Cascades-Development/Application-Menus/td-p/1785653
-
How to view the anticipated date of 3 days bb
Greetings
How to view the early date to 3 days with bb.
I was able to view the current in bb, but can not able to display the date fututre.
Help, please
concerning
Anthony singh
Hello
Add 3 days to the current date.
days3 long = (3 * 24 * 60 * 60 * 1000); MS
TimeFormat SimpleDateFormat = new SimpleDateFormat ("YYYY/MM/DD HH: mm: EEE");
timeString = «"+ timeFormat.formatLocal (System.currentTimeMillis () + Days3);»Thank you
Stephenson
-
How to view the status of the battery power of the screen of boot menu showing the tiles?
How to view the status of the battery power of the screen of boot menu showing the tiles?
Just do the gesture of "drag the right edge" which evokes the "charms" on the right side. It also brings a great left low Panel with date/time, battery level, and State WiFi icons. No need to clutter up the screen with him all the time. ;)
-
How to view the log with the identifier of Eloqua UI/API?
I am trying to import customer contact Eloqua system using a restful api in Java.
He got 500 Internal Server Error when call POST Api/rest/1.0/data/contact.
In fiddler, we know that answer pleased as below:
Internal server error
There was an internal server error.
The error was logged with log identifier 551654381.
Please provide this identifier to log technical support.
I want to know how to view the log of 551654381 ?
Anyone who has the experience to import contacts using the Restful API or API bulk?
Screenshot of Fiddler:
Hi Tim,.
The API error log is not available through the UI Eloqua, is accessible by Eloqua support only. If you supply the ID error when you connect to a service request with the support of Eloqua, it will make it easier for them to diagnose your problem.
-
How to view the text onto an interactive button in Indesign CC?
How to view the text onto an interactive button in Indesign CC?
I'm doing my map.
I am now able to link a button in my card to a website url, but what I really want is a way to make the text appear next to a button, it shows what kind of construction is by turning over with the mouse.
One?
-
How to view the PDF in JavaFX?
How to view the PDF in JavaFX? Thanks for the suggestions.
Not with this app as written: it simply makes each page as an image. You might be able to take advantage of the API of the PDF-Converter Labs Swing that I used in this example to get more features: I have not watched which closely.
I noticed the warnings with some codes not recognized for some PDF files. Which comes from the library of PDF-Converter, rather than any code of FX.
-
How to view the error logs in awm
I just finished my cube of construction and it failed. How to view the error log itself for me to be able to know exactly what size are the original questions. When using
Select * from cube_build_log
It does not give me the real dimensions causing problems?
Please help
Thank you
There are several levels of logging, so I would need to know more before I can tell you that one to watch.
- Have you built using MN or through DBMS_CUBE. BUILD?
- What is the exact error you received?
- What do you learn the following query?
SELECT OUTPUT, BUILD_OBJECT_TYPE, BUILD_OBJECT, BUILD_ID
OF CUBE_BUILD_LOG
WHEN STATUS = 'IMPOSSIBLE '.
ORDER BY TIMES DESC
-
Hi, I would like to ask how to view the current settings of the sequence, I'm already working the same information that is displayed when you open for the first time a new sequence
for example.
General
Editing mode: QuickTime DV PAL
Time Base: 25.00fps
Video settings
Image size: 720: 576v (1.4587)
Frame rate: 25.00 FPS
Format of the pixels: PAL D1/DV widescreen 16:9 (1.4587)
Fields: Bottom field first
Audio settings
Sample rate: 48000 samples/second
Default sequence
Total of the video tracks: 3
Master the track type: stereo
Audio tracks:
Audio 1: Standard
Audio 2: Standard
Audio 3: Standard
I forgot what setting I chose for my current sequence and tried to look under project settings , as well as the sequence settings
but do not show the news that you see when you open a new sequence for the first time, especially if the edit mode is PAL or NTSC etc.
How can I find this information which my current sequence is on?
Thank you
Sequence / sequence of setting you will find all the information.
If his pal, you're on 25 or 50 fps.
the rest is ntsc.
-
How to view the history of the exams?
I want to know how to make someone look at his history of review?801264 wrote:
OK, this is how you show your certificate. But how to view the history of the review?
I just spent a few hours ago 1Z0-051. Now, I want to see my own historical review. How can I do this? Via certview, or should I go directly to the website of pearson?Published by: 801264 on December 23, 2010 16:34
Pearson VIEW find out of your exam at Pearson VIEW history... but he will not know about certifications.
Certiview will be your story for review and certification. Are can be a lag of a few days between information get Pearson view at Certview.
Maybe you are looking for
-
Music playlists Apple disappeared after missed payment
Hi guys,. So I stupidity never paid my subscription of Apple's music at the time and had to re - subscribe literally the same day where the service has stopped and I have my music playlists saved on iPhone Apple and iTunes were no longer there. Any i
-
I have a dell 966 AOI while a wireless printer. I can only operate by connecting using the supplied cable. I use windows xp professional and the linksys g usb adapter. I have no installation cd. The office that I use is connected to the network wirel
-
HP laserjet 500 color m551: hp laserjet 500 color m551
I have a hp laserjet 500 m551 color model, whenever I put the power 'ON' it's about list of disk check 100% on the display panel. I tried to push the switch but it does not. Thank you
-
Cannot install XP upgrade after drive failure
I have a 2nd PC on which I did a Windows XP Home upgrade years ago. The hard drive failed and the upgrade CD will let me install a new hard disk. It is just a backup/test PC and I would keep as an XP system. Is there a way around this problem?
-
I run the disk error control utility to check if there is no problem with my drive C. I have the option "analysis and recovery disk bad sector. The utility is run at the end of phase 2, but has failed to complete. I run the utility even twice, with t