How to rotate the table?
Hi, I have a query that produces the following result:
A B C D
----------------- ------------------ ------------------ ------------------
BEGINNING 2013-01-31 28-02-2013 2013-03-31
VALUE1 552488.86520999996 553429.08377000003 548169.86664999998
VALUE2 26883.37285 24362.411590000003 24697.108139999997
I want to make a 'simple' conversion and get the result like this:
DATE VALUE1 VALUE2
----------------- ------------------ ------------------
2013-01-31 552488.86520999996 26883.37285
2013-02-28 553429.08377000003 24362.411590000003
2013-03-31 548169.86664999998 24697.108139999997
Now, if I use the PIVOT clause, I get everything in one line only with different column names. If I use UNPIVOT I get only two columns with mixed values and dates. It is quite useless for me...
So, how do you achieve this? I have a fairly simple solution, because real dataset is much, much bigger and I would like to avoid the dynamics, Monster requests: P
DB version: 11.2.0.3.0
For 11g using unpivot/pivot
https://forums.Oracle.com/thread/2584868
with t
as
(
Select 'DATE', ' 2013-01-31' b, ' 2013-02-28' c, ''d 2013-03-31
of the double
Union of all the
Select 'Value1', ' 552488.86520999996' b, ' 553429.08377000003' c, '548169.86664999998'd»»'
of the double
Union of all the
Select 'Value2', ' 26883.37285' b, ' 24362.411590000003' c, '24697.108139999997'd»»'
of the double
)
Select d, v1, v2
BeO
Select * from t unpivot (val for q (b, c, d))
)
Pivot (Max (Val) for a in ('DATE'd, 'Value1' v1, v2 'Value2'))
D | V1 | V2 |
---|---|---|
2013 03-31 | 548169.86664999998 | 24697.108139999997 |
2013 01-31 | 552488.86520999996 | 26883.37285 |
2013-02-28 | 553429.08377000003 |
24362.411590000003 |
----
Ramin Hashimzade
Tags: Database
Similar Questions
-
How to clear the table dhcp clients
Does anyone know how to clear the Table of Clients DHCP?
I have a WRV54G.
Concerning
I understand this is a very old post, but since I found it when I was looking for the same answer in 2009, I thought go ahead and give my $.02 worth.
I have a different router, so it may not be present in your.
I use a version of the firmware WRT54GLwith 4.30.7 and finally found on the status under "Local network" page a link to the DHCP table. You can click on that and delete existing IP addresses.
-
somehow my screen turned completely sideways, how to rotate the screen back to normal?
somehow my screen turned completely sideways, how to rotate the screen back to normal?
Use the Ctrl key or the Alt key with the arrow keys to rotate your screen to its normal position. You can also right-click an empty space on your desktop and in the context menu that appears look for the rotation of the screen, orientation, landscape, or something similar.
Kind regards
-
How to rotate the image in movie maker a few degrees to get it exactly horizontal
If my camera was slightly off level during recording, how I rotate the image a few degrees in Movie Maker to get this level
I found a copy of 1.9.2.
Excellent
Wayne
-
How to rotate the image only once
Hai, I am very new in the development of blackberry applications. I need an image that need to be done rotate 360 degrees once only. I see so many references here and I know that there is a thread that discuss it, but I can't find the right one.
Thanks in advance.
You asked a single rotation - "how to rotate the image only once.
There is no standard API that provides a rotating image permanently using standard features of BlackBerry.
The usual way to display animations is demonstrated in this article.
http://supportforums.BlackBerry.com/T5/Java-development/display-an-animated-GIF/Ta-p/445014
If you can prepare your animation and package with your application, it will be much easier and more effective. Do you know what pictures you're going to turn?
-
How to know the tables used in packages of a schema.
How to know the tables used in packages of a pattern that I have connected.
SELECT DISTINCT referenced_owner, referenced_name
Of all_dependencies
Owner WHERE = "MY_USER_NAME".
AND type ('PACKAGE', 'BODY of PACKAGE')
AND referenced_type = 'TABLE '.
-
I use Adobe Reader Touch. How to rotate the pdf?
How to rotate the pdf? I tried a bunch of different commands and it seems that the selection of actions in the application itself is very limited. Help, please!
Not possible with Adobe Reader Touch.
-
How to rotate the image in the muse of adobe?
Hello.. I would like to know how to rotate the image in the muse of adobe?
Use this free widget:
https://creative.Adobe.com/addons/products/2117#.VXla5jNcOeV
-
How to purge the table ECX_OUTQUEUE of the ECX_OUTBOUND AGENT
How to purge the table ECX_OUTQUEUE of the ECX_OUTBOUND AGENT
904632 wrote:
How to purge the table ECX_OUTQUEUE of the ECX_OUTBOUND AGENT
Please see (how to recreate the ECX Related queues? (Doc ID 1354312.1)).
Thank you
Hussein
-
How to rotate the orientation of the document on the embankments and the sign?
How to rotate the orientation of the document when I use fill and sign.
Hi valreeb,
The service that does mean Ajlan is only available to subscribers of Acrobat Professional or Standard. It is not available as a stand-alone service, so you can't see it on Acrobat.com. If this isn't the case, we invite you to try Acrobat free for 30 days. See www.adobe.com/products/acrobat.html for more information.
-
How to design the table from the answer to the question table.
Hi all
I am creating an application for student review online.
There are two types of questions, the only choice of response and multi choice answers.
My question is less than
my table to answer (I'm not satisfied with who is belowcreate table question_master ( exam_id number references exam_master(exam_id), marks_of_each_question number, type_of_question char(1),-- single choice answer/multiple choices answer q1 varchar2(2000), q2 varchar2(2000), q3 varchar2(2000), q4 varchar2(2000))
now, I'm perfectly how to create the RESPONSE table to contain the answers.create table answers_of_questions ( answer_id number primary key, question_ID number referenes question_master(question_id), answer varchar2(4000) not null, is_answer_correct char(1),--y/n, student_selection char(1),--y/n student select it or not .... ...
the only choice is good, but several checkboxes choices, what to do?
How to design the table from the answer?
do I have to create 2 tables to contain the answers?
Note: the QUESTIONS and ANSWERS, all will be entered by the teacher. students will make a choice and I will store this choice in another table
may be called STUDENT_SELECTED_ANSWERS or something like that.
If anyone has some reference to the script retail scheme review online, kindly share with me.
Kind regards.
Kind regards.If you need to have answers in another table:
Student (student_id, name, etc...)
Review (exam_id, exam_name, etc...)
Question (question_id, exam_id, question_text)Response (question_id, a_text, b_text, c_text, d_text, a, b, c, d).<-- one-to-one="" with="" question="" table,="" a-d="" flags="" used="" to="" indicate="">-->
OR
Response (question_id, answer_id, answer_text, OK)<-- many-to-one="" with="" question="" table,="" correct="" flag="" used="" to="" indicate="" correctness="" for="" this="" single="">-->Student_Answer (student_id, question_id, a, b, c and d)
OR
Student_Answer (question_id, student_id, answer_id)<-- creation="" of="" a="" question_id+answer_id="" in="" this="" table="" implies="" the="" student="" checked/selected="" it="" as="" an="">-->To what extent you want to standardize, it is up to you.
-
How to rotate the image
There are several ways to rotate an image in Photoshop.
As mentioned above, using the Image menu allows you to rotate your entire canvas area. Go to Image > Rotation of Image and select either 180 °, 90 ° CW (clockwise), or 90 ° CCW (the clockwise direction).
In the picture menu, you can also select arbitrary to indicate the exact amount that you want to rotate your image:
You can also use free transform to rotate an image or an individual layer. Go in Edit > transform , then select Rotate. Use the handles that appear around your image to rotate. Note that this method may require you to resize your canvas size to include your entire image (to do this, you can use the Crop function).
Feel free to answer all questions!
See you soon,.
Kendall
-
How to add the table radio button.
Hello
I want to update the record if I want that an option of button raduio shaped tabular .There is no option for tabular.
How to add the table radio button.
Thank you
Published by: 805629 on February 3, 2011 04:56Use APEX_ITEM. BOX API in the definition of SQL query for the form of tables
-
How to check the table have are all views in oracle
Hello
How to check the table have are all views in oracleSELECT * FROM user_dependencies WHERE type='VIEW' AND referenced_type='TABLE' AND referenced_name ='Your_Table_Name'
You can use dba_dependencies to find views in the different schema.
-
How to rotate the IPAD during installation (down key does not)
Hi, I have an old 1st generation IPAD where the bottom 10% of the screen no longer works. I tried to reset the IPAD, but now I'm stuck on the screen "to accept the license. Is there a way to get around this? Can I rotate the screen at this time?
Thank you
Hi Icetbr,
What a great iPad model you have there! If you already tried to change the orientation of the screen during the initial installation without success, then you will not be able to turn right there. But no worries. You may be able to activate the Zoom feature during the installation process that will allow you to access the agreement to license button. Also, given that you have problems with the display, you should consider having repaired to your Apple local store or service center. The steps and the links below will help you activate the Zoom feature as well as to get some great info to get your iPad repaired if you choose to.
When you turn on your iPhone, iPad or iPod touch for the first time, you can quickly activate VoiceOver or Zoom for you help to set up your device. Here's how:
Zoom
To activate the Zoom, use three fingers and double-tap the screen.
To increase the Zoom level, use three fingers to double - tap and hold, and then move your fingers upward or downward on the screen to increase or decrease the magnification.Use the accessibility features in iOS
Thank you for using communities of Apple Support. Have a great day.
Maybe you are looking for
-
Options of additional storage on Satellite L850-13R
Hello, everyone, I have a laptop Toshiba L850-13R. I want to add storage SSD internal, not replace my current hard drive - something like 128 GB for Windows.Did someone familiar with the specifications of the model? What choices do I have?Is it possi
-
I was asked to update Google chrome, when I did it installed Mackeeper. How can I get rid of Mackeeper now please help. I have the El Capitan version 10.12.2.
-
The MID-7604 puts a lot of noise, where can I get cables isolated for it?
I use a motor driver stepper MID-7604. I want to reduce the ground loop noise in the system that I'm able on my PXI-5152 (through a series of sensors, etc.) using an optical isolator or transformer for cable VHDCI 68 pin that connects the engine to t
-
Cannot open the Task Manager (replace Win 7 Task Manager) in Windows XP Professional SP3
Hi guys, my computer is Windows XP Professional SP3, my problem is the Task Manager can't open because I change for the Windows 7 Task Manager to test open this software. I have FORGOTTEN to save the original Win XP Task Manager! HOW CAN I DO? I want
-
Lack of blackBerry smartphone browser
I lost my browser out of my BlackBerry. I had to wipe my phone, and when I restored it all, my browser was gone. Can someone tell me how I get it back? I have a Pearl 8130