How to rotate table?
Hi, I have some query that produces following result:
A B C D
DATE 2013-01-31 2013-02-28 2013-03-31
VALUE1 552488.86520999996 553429.08377000003 548169.86664999998
VALUE2 26883.37285 24362.411590000003 24697.108139999997
I would like to do 'simple' transposition and get 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 PIVOT clause, I get everything in one row only with different colums names. If I use UNPIVOT I get only two columns with mixed values and dates. It's quite useless for me...
So, how to achieve this? I search for quite simple solution, because real dataset is much, much larger and I would to avoid dynamic, monster queries :P
Db version: 11.2.0.3.0
SQL> select * from v$version;
BANNER
Oracle Database 10g Enterprise Edition Release 10.2.0.5.0 - 64bi
SQL> with t
2 as
3 (
4 select 'DATE' a, '2013-01-31' b, '2013-02-28' c, '2013-03-31' d
5 from dual
6 union all
7 select 'VALUE1' a, '552488.86520999996' b, '553429.08377000003' c, '548169.86664999998' d
8 from dual
9 union all
10 select 'VALUE2' a, '26883.37285' b, '24362.411590000003' c, '24697.108139999997' d
11 from dual
12 )
13 select max(decode(a, 'DATE', val)) date_
14 , max(decode(a, 'VALUE1', val)) value1
15 , max(decode(a, 'VALUE2', val)) value2
16 from (
17 select a
18 , decode(rno, 1, b, 2, c, 3, d) val
19 , rno
20 from t
21 cross join (select level rno from dual connect by level <=3)
22 order
23 by a
24 )
25 group
26 by rno;
DATE_ VALUE1 VALUE2
2013-01-31 552488.86520999996 26883.37285
2013-02-28 553429.08377000003 24362.411590000003
2013-03-31 548169.86664999998 24697.108139999997
For 11g and above
with t
as
select 'DATE ' a, '2013-01-31' b, '2013-02-28' c, '2013-03-31' d
from dual
union all
select 'VALUE1' a, '552488.86520999996' b, '553429.08377000003' c, '548169.86664999998' d
from dual
union all
select 'VALUE2' a, '26883.37285' b, '24362.411590000003' c, '24697.108139999997' d
from dual
select *
from (
select a
, decode(rno, 1, b, 2, c, 3, d) val
, rno
from t
cross join (select level rno from dual connect by level <=3)
order
by a
pivot (max(val) AS val FOR (a) IN ('DATE' AS date_, 'VALUE1' AS value1, 'VALUE2' AS value2));
Similar Messages
-
Hi,
In a page layout document, I have a table that was created to be read 90°.
Now, I need to bring the table in a normal orientation.
I know how to rotate de text inside the cell but I need to rotate the whole table.
So the header that is actualy the left column become the top row.
I can't figure out out to rotate the table.
I copied and pasted the table outside the page to rotate it. But, when pasted back in the page layout, it still turn 90°.
Does anyone can help me?
ThanksThe only way to rotate an entire table is to rotate the text frame that
the table is in.
So just select the text frame that the table is in, and rotate 90 deg.
You will need to readjust the textframe so that it fits the page margins
again.
Ariel -
How do I rotate tables in Pages 2014 on Yosemite?
Hi! I've been working on my thesis on Pages 09 and it worked really great! I bought a new MacBook Pro with Retina and switched to the new iWork... There are a few features that I used in Pages 09 that now are missing like 'two up' view and the possibility to rotate tables. Does anyone know how can one rotate a table to 90 degrees in the new version of Pages?
Thanks!Have you updated to iWork '09 v4.3?
iWork for Mac: High Resolution support - Apple Support
Peter -
Acrobat Pro XI Will Not Print Word Document with a Rotated Table
I have a MS Word document that is mostly text, but include a table that has been rotated in a text box to fit on the page. When I try to print to PDF using Acrobat Pro XI, the document crashes at the page the table is on.
I have tried several attempts to print using the Acrobat Printer, convert to PDF feature and trying to print just the page alone. Acrobat will simply not print word document with a rotated table.
Any idea how to fix this?
Word 2013, Windows 7, Acrobat Pro XI 11.0.06In the full document, the print to PDF goes only as far as the table, then ends - not printing the table. The remaining pages are not printed.
For example, I have trimmed the file down to just the table page, and included links to it, and a copy of the PDF it generated.
https://dl.dropboxusercontent.com/u/60543835/Forums/Table%20Sample_140903.docx
https://dl.dropboxusercontent.com/u/60543835/Forums/Table%20Sample_140903.pdf
The error message I now get when I try to print is: "There is not enough memory or disk space to repaginate or print this document."
However, with the Task manager open, the memory never seems to get above half of the available (the graph bar fluctuates a little, but stays stable")
The page prints to a regular HP or Xerox printer with no problems. -
How get all table name from database
hi master
sir
how get all table name from databaseThe big question is 'why'.
Selecting from view 'dba_tables' will indeed give the list of all tables in the database, but that includes the dictionary tables and the internal tables, and many others that are probably not of interet to a person who needs to ask this question. Besides, the dba_tables view requires access to a DBA account.
There are several other views: "user_tables" will list all the tables in this user's schema; and "all_tables" will list all the tables this user can access in some way.
The above do not, of course, include any information about synonyms, sequences, views, indexes and so on.
The correct answer and the meaningful answer may be two different things. -
How to move table from one tablespace to other tablespace?
how to move table from one tablespace to other tablespace?
887274 wrote:
how to move table from one tablespace to other tablespace?
alter table <table_name> move tablespace <new_tablespace_name>;
Rebuild the indexes; alter index <index_name> rebuild <new_tablespace_name> online;Example;:
SQL> create table ttt( ID NUMBER PRimary key);
Table created.
SQL> insert into ttt values (1);
1 row created.
SQL> commit;
Commit complete.
SQL> select index_name, status from dba_indexes where table_name='TTT';
INDEX_NAME STATUS
SYS_C0010863 VALID
SQL> alter table ttt move tablespace users;
Table altered.
SQL> select index_name, status from dba_indexes where table_name='TTT';
INDEX_NAME STATUS
SYS_C0010863 UNUSABLE
SQL> alter index SYS_C0010863 rebuild tablespace users online;
Index altered.
SQL> select index_name, status from dba_indexes where table_name='TTT';
INDEX_NAME STATUS
SYS_C0010863 VALID
SQL> -
How to use Table valued MSSQL function in OBIEE
Hi all,
Can some one help me to understand how to use table valued function in OBIEE? I want to use a table valued function (MSSQL function, with some input parameter), in the physical layer to pull the data?
I know for MSSQL Stored Procedure we can write as
EXEC SP_NAME @Parameter = 'VLUEOF(NQ_SESSION.Variablename)'
but now I have a table valued function in the query window I can get the data as
select * from myfunction(parametervalue)
In physical layer of OBIEE I have tried as
select * from myfunction('VLUEOF(NQ_SESSION.Variablename)'), but I'm getting error as the NQ_SESSION variable doesn't have a value , but actually I have initialized the variable but still Im getting error.
Can some one help me to solve this.
Thanks,
MithunFollow this link and try yourself. let me know for issues
Substring instr issue in obiee
Appreciate if you mark
Edited by: Srini VEERAVALLI on Feb 20, 2013 8:13 AM -
How to add table in SAP Non interactive forms in webdynpro java
Hi Experts,
I have a requirement in webdynpro java.I have a print button.On clicking print button a pdf will be opened.
This pdf will have data from the webdynpro view.I want to know how to add table in the adobe pdf.The webdynpro view will have many rows of table(rows will keep changing as per the size of the data output).How to send this data to adobe.How do we bind the node to the table in the adobe.How to automatically
Please suggest.
Thanks,
Rajani
Edited by: Rajani Nandagiri on Dec 26, 2008 8:58 AMRajani,
Take a look at below links, it will help you.
[Handling Dynamic Length Tables in Adobe Forms|https://www.sdn.sap.com/irj/sdn/go/portal/prtroot/docs/library/uuid/e0859ad1-53aa-2a10-78ae-99e41c407669]
[Integrate tables & Images in Adobe Web Dynpro|https://www.sdn.sap.com/irj/servlet/prt/portal/prtroot/com.sap.km.cm.docs/library/user-interface-technology/wd%20java/wdjava%20archive/dynamic%20non-interactive%20pdf%20form.pdf]
[How to Handle Table Input and Output|https://www.sdn.sap.com/irj/servlet/prt/portal/prtroot/com.sap.km.cm.docs/library/user-interface-technology/wd%20java/7.0/adobe/how%20to%20handle%20table%20input%20and%20output.pdf]
[How Tou2026deal with Table input and display in Interactive Forms|https://www.sdn.sap.com/irj/sdn/go/portal/prtroot/docs/library/uuid/00c4041d-188d-2910-6ea2-b4d5155f56e0]
Chintan -
How to rotate a text in the adobe reader for mobile ios ?
how to rotate a text in the adobe reader for mobile ios ?
There's no rotate command to rotate the document. Instead, rotate the iPad. If it doesn't rotate, turn off the Rotation Lock switch on the side of your iPad.
-
How to get table headers in jsp page
hi,
this is praveen, can any one help me to solve this problem.
how to get table headers in a jsp page. whether it is possible using javascript or is there any other way.
pls send rep.
thank u.Hai ,
I Think This will help ful for u check it ,
File=new FileLog("f:/WebServiceTrace/trace2.%g.log", 800000, 10, new TraceFormatter());
The above code specifies the path for your log file.
Then add this file as a log location and then log the traces. For this you can use the following code like:
Location location=Location.getLocation(className);
location.addLog(file);
location.setEffectiveSeverity(Severity.ALL);
location.entering(methodName);
To Create j2ee apllication
In path new-j2ee-jsp to create JSP's can only be used for J2EE applications.
So as you are using this in Portal Application, this does not work.
You can test this bahavior by creating a new Web Application (New-Project-J2EE-Web Module Project)
In this Web Module Project, try creating JSP, this will work.
So dont use new-j2ee-jsp to create JSP in Portal Application instead use New-File and name the file as jsp.
Regards ,
venkat -
Does anyone know if/how to rotate a video clip in iphoto? I shot it so that it plays sideways on my computer and I cannot figure out how to rotate it. Thanks.
You can't do that in iPhoto. You'll need a video editor like iMovie for the job.
Regards
TD -
How to find table name for the fields from Standard Extractor in CRM system
How to find table name of fields from the standard extractor in CRM system ?
e.g. We use LBWE TCode in R/3 system to find table name for the field from Extractor VCSCL(e.g.).
Likewise is there any way to find table name for the fields from Standard extractor like 0CRM_LEAD_I.Hi ,
Please find the link below for understanding BW CRM analysis.
http://help.sap.com/bp_biv135/html/bw.htm
activate the CRM DSs by scenario:
1) Activate the application component hierarchy (tcode RSA9). Changes made to the application component hierarchy in the CRM system can be transferred to the BW using the "Edit Application Component Hierarchy" (SBIW - Postprocessing of DataSources).
SAP Note 434886 must be implemented in CRM 3.0 before the application component hierarchy is activated.
2) Activate the Business Content DataSources (tcode RSA5).
Select/enter the application component and choose Execute (F8).
To compare the shipped and active versions, choose the 'Select Delta' pushbutton. If there is no active version of the DataSource, it is selected automatically.
To activate the shipped version, choose the 'Transfer DataSources' pushbutton.
3) Management of the versions of the BW-Adapter metadata (tcode BWA5). All DataSources are displayed that are managed by the BW Adapter.
As in transaction RSA5 (Service API Metadata Activation), the 'Select Delta' function can be used to select the inactive DataSources or compare shipped and active versions.
You can also go directly to the screen for maintaining DataSources that are managed by the BW Adapter.
The 'Compare Version' function makes a detailed comparison of the shipped and active versions.
All BW-Adapter metadata is considered when versions are compared:
Header information (Table SMOXHEAD)
Mapping information (Table SMOXRELP)
Global selection conditions (Table SMOXGSEL)
Attribute key fields (Table SMOXAFLD)
Hope this helps.
Regards,
csm reddy -
How to implement table in applet
hi friends
i have no idea ,how to implement tables in awt for applet can u suggest way to solve my problem.im using jcreator to implement my project.Crosspost: http://forum.java.sun.com/thread.jspa?threadID=783376
You already got plenty of answers. Why do you ask again? Didn't you like the answers? -
How to relocate table in new tablespace in Oracle 8i
Hi all
I would like to know how to relocate table from one tablespace to another tablespace in Oracle 8i. Currently, I create new table without data in new tablespace and then load data from old table in old tablespace. However, I think it is not efficient at all. Could anyone kindly advise any method to proceed it
ThanksNick has pointed out the best way to relocate a table. With the alter table move command you do not have to worry about FK or any other kind of constraints, table triggers, or grants. They all remain in place. You just need to rebuild the indexes as Nick pointed out.
There were some restrictions on the types of tables that could be moved with alter table move when the command first was introduced. I think LOB columns were unsupported at first. The old exp/imp had to be used for those cases.
HTH -- Mark D Powell -- -
How to compare table in different versions?
Hi,
Please let me know how to comare table fields in different versions?
Ex: I need to compare the table fields of version 4.5 with ECC6.0.
Thank you.Hi,
goto Se11 Transaction -> enter table -> display.
Utilities ->Version -> version management
now click on remote comparison -> enter target system.
Regards
Kiran Sure
Maybe you are looking for
-
Access for the Public / Site problems
What is the best way to give access to the Public & still keep the private sections / courses, etc. private? According to the docs, the All System credential's access permission should be updated to "Download" for the public to see anything. If I sel
-
Funny thing is, I managed to do it once but I didn't know how I did it. :smileyvery-happy:Now I don't remember. So, again...How Can I Listen To My Zen Touch On Windows Media Player? I'd especially like to do this on my terminal at work. :smileytongue
-
I restored my ipod touch (old version, silver back cover) but after erasing all the memory in it, Itunes showed me an error message ......The Ipod ''Ipod'' could not be restored. An unknown error occured (1)....What is the problem or how can I resolv
-
Migrate NT to UNIX with minimum downtimo on production
Can we use the following steps to migrate a production database from NT to UNIX using replication techniques with minimum production downtime? 1. Create snapshot logs for all tables on NT. 2. Create snapshots for all tables on UNIX box. Refresh all t
-
Running OS 10.7.3 Safari 5.1.3 I get the blue box all the time, on all different types of pages....sometimes reloading the page helps. Is there something I can do?