Column and row of transformation
If I have a table with two columns, let's call them 'name' and 'value ':VALUE NAME
ABC 1.11
ABC 2.33
ABC 3.44
ABC 1.22
... ...
... ...
DEF 3.66
DEF 2.22
DEF 9.99
...
IGS 7.77
IGS 3.44
IGS 1.34
IGS 1.22
--------------------------------------------------------------------------------------------------
Is it possible to convert this table data in the following format:
ABC DEF GHI
1.11 3.66 7.77
2.33 2.22 3.44
3.44...
?
with an execution plan, it's good.
If I do something like this:
Select a.value as 'ABC', b.value form 'DEF '... DE)
Select x.data in the x the_table where x.name = 'ABC'),
Select x.data from the x the_table where x.name = 'DEF') b
...
...
I have an execution plan that is just crazy. So I need some help on this issue.
And if you're on 11g, pivot solution:
select ABC,
DEF,
GHI
from t
pivot (
sum(variable_data)
for variable_name in (
'ABC' as ABC,
'DEF' as DEF,
'GHI' as GHI
)
)
/
ABC DEF GHI
---------- ---------- ----------
.5 .7 .7
.6 .88 .8
.7 2.3 2.3
SQL>
SY.
Tags: Database
Similar Questions
-
can I write in a clay column and row in excel?
Hello!!!
Well, is - can anyone help me and tell me, if I can write something of labview in a clay column and row in excel?
excellent couerse in a clay column and row to an existing file...
CAN SOMEONE HELP ME OR SAY SOMETHING PLEASE?
Ago, as Sophia said, you can do this using ActiveX, but that requires a lot of programming
but you can learn a lot
-
How to save the table column and row headings
I have a table where I activated the column and row headings. Once the table is loaded with data, I would like to save the contents of the table, including the column and row headings in a text file. The crux of "value" property returns only the content of the table, not the row and column headers. I could use "header line chains []" and '[] column header chains' property nodes as well, but I'm in the island there is an easier way. Looks like adding the headers of lines would be difficult. Any ideas?
Thanks in advance.
Here is a way. The construction with the empty constant is to provide to the left corner of the table where there is no data.
-
I tried to download a pdf and convert them into excel, but the data in excellent is always to the image format. How can I get the pdf data into the columns and rows so that I can do the calculations?
If you start the https://forums.adobe.com/welcome Forums Index
You will be able to select a forum for the specific Adobe products you use
Click on the symbol "arrow down" on the right (where it is said to see all our products and Services) to open the drop-down list and scroll
-
Remove the separator of columns and rows in spark DataGrid
Hello
try searching a bit on the web with no success - how can I remove / handful of visibility of the separators of columns and rows in the DataGrid to spark flex 4.5
See photo with separators:
Two ways:
(1) write a simple custom following appearance (the empty rectangles will cause the separators to disappear):
(2) make a copy of the default Datagridskin and remove parts of skin 'columnSeparator' and 'rowSeparator.
-Kevin
-
Relation to the total column and row grand totals
Hello world
I have requirement I need to create a statement of expenses with BI Publisher in Siebel. I need to group the items of expense by date and have a show total amount for the row and column. The report should look like this when done:
FEES
Date of... Meals... Entertainment... Total
06/19/09.........75......................175............................250
06/20/09.........50 ..................... 50..............................100
------------------------------------------------------------------------
Total... 125....................225............................350
I do not know how to address the issue since the amounts for the "meal" and "Entertainment" is not stored in separate columns, but instead of this, there is a 'Category' column and a column 'amount '. The XML should look like this:
< EXPENSE_REPORT >
< ID > 232 / < ID >
< NAME > fresh June < / NAME >
< EXPENSE_ITEMS >
< DATE > 19/06/09 < / DATE >
MEAL < CATEGORY > < / CATEGORY >
< > 25 < / AMOUNT >
< / EXPENSE_ITEM >
< EXPENSE_ITEMS >
< DATE > 19/06/09 < / DATE >
ENTERTAINMENT < CATEGORY > < / CATEGORY >
< AMOUNT > 50 < / AMOUNT >
< / EXPENSE_ITEM >
< EXPENSE_ITEMS >
< DATE > 20/06/09 < / DATE >
MEAL < CATEGORY > < / CATEGORY >
< AMOUNT > 50 < / AMOUNT >
< / EXPENSE_ITEM >
< / EXPENSE_REPORT >
Any suggestions on how I should approach this? Thanks in advance.
Fred
Published by: Fred_1 on September 21, 2009 22:30Fred/Kumar,
1. it should be simple enough to BEEP model too.
2. a glance the link thread above, I answered how do in Datatemplate.
3 Db rollup is also good optionLook at this
http://winrichman.blogspot.com/2009/09/cross-tab-summation-in-RTF.html
Take a look at these too, it will help you for sure.
http://winrichman.blogspot.com/search/label/cross%20tab
http://winrichman.blogspot.com/search/label/BIP%20Vertical%20sum
http://winrichman.blogspot.com/search/label/cross-tab
http://winrichman.blogspot.com/search/label/summation%20In%20BIP -
How to join two tables if you transpose the rows, columns and rows in one of the table
Hi guys,.
can someone help me please in the write request
I have two tables
Agents and Agent phones but in the agent phones table for the id of an agent it displays 4 rows because one of the column there types of different phones (office, mobile, home, fax)
So instead of display 4 rows, I used max(case...) to convert rows to columns
now how to reach it with another table
Requirement:
Database: 11.2.0.2.0
create the table AGENT_PHONE
(
agent_id NUMBER (20) not null,
agent_type_code VARCHAR2 (10) not null,
agent_type_prefix VARCHAR2 (10) not null,
Phone_Number VARCHAR2 (16) not null,
phone_type_code VARCHAR2 (10) not null
)
CREATE TABLEAGENTS
(
agent_id NUMBER (20) not null,
agent_type_code VARCHAR2 (10) not null,
agent_type_prefix VARCHAR2 (10) not null,
NAME VARCHAR2 (40) NOT NULL
)
INSERT INTO AGENT_PHONE(AGENT_ID,AGENT_TYPE_CODE,AGENT_TYPE_PREFIX,PHONE_NUMBER,PHONE_TYPE_CODE)
VALUES (29709, ARE ', 'OFFICE', '4805551436', 'CELL');
INSERT INTO AGENT_PHONE(AGENT_ID,AGENT_TYPE_CODE,AGENT_TYPE_PREFIX,PHONE_NUMBER,PHONE_TYPE_CODE)
VALUES (29709, ARE ', 'OFFICE', '1111111111', 'PHONE');
INSERT INTO AGENT_PHONE(AGENT_ID,AGENT_TYPE_CODE,AGENT_TYPE_PREFIX,PHONE_NUMBER,PHONE_TYPE_CODE)
VALUES (29709, ARE ', 'OFFICE', '2223334444',' OFF');
INSERT INTO AGENT_PHONE(AGENT_ID,AGENT_TYPE_CODE,AGENT_TYPE_PREFIX,PHONE_NUMBER,PHONE_TYPE_CODE)
VALUES (29709, ARE ', 'OFFICE', '5556667788', 'FAX');
INSERT INTO VALUES AGENTS
(29709, ARE ', 'OFFICE', 'FLY');
INSERT INTO VALUES AGENTS
(1234, ARE ', 'OFFICE', 'MIKE');
SELECT * FROM AGENT_PHONES
AGENT_ID AGENT_TYPE_CODE AGENT_TYPE_PREFIX PHONE_NUMBER PHONE_TYPE_CODE ---------------------------------------------------------------------------------------------
29709 RE OFFICE 4805551436 CELL 29709 RE OFFICE 1111111111 PHONE 29709 RE OFFICE 2223334444 OFF 29709 RE OFFICE 5556667788 FAX
SELECT * AGENTS
AGENT_ID AGENT_TYPE_CODE AGENT_TYPE_PREFIX NAME
29709 RE OFFICE ROB 1234 RE OFFICE MIKE
This is so the data we have in both table
Now, I transposed rows to columns in the table of agent phones so I used the following query
SELECT AP. AGENT_ID,. AGENT_TYPE_CODE,. AGENT_TYPE_PREFIX.
MAX (CASE WHEN AP. PHONE_TYPE_CODE = 'CELL' THEN AP. PHONE_NUMBER END) AS CELL.
MAX (CASE WHEN AP. PHONE_TYPE_CODE = 'OFF' THEN AP PHONE_NUMBER END) AS TURNED OFF.
MAX (CASE WHEN AP. PHONE_TYPE_CODE = 'FAX' THEN AP. PHONE_NUMBER END) LIKE FAX,.
MAX (CASE WHEN PHONE_TYPE_CODE = 'PHONE'. THEN AP PHONE_NUMBER END) AS PHONE
AGENT_PHONE AP
WHERE AP. AGENT_ID = 29709
GROUP OF AP. AGENT_ID, AP. AGENT_TYPE_CODE, AP. AGENT_TYPE_PREFIX.
AGENT_ID AGENT_TYPE_CODE AGENT_TYPE_PREFIX CELL OFF FAX PHONE 1 29709 RE OFFICE 4805551436 2223334444 5556667788 1111111111 My question is how this to join the agents table so that my output should be like this...
I want to display all the results in the table of the Agent, even if they are not in the table of agent phones. As you can see there are other agent id 1234 is also populated
AGENT_ID AGENT_TYPE_CODE AGENT_TYPE_PREFIX NAME AGENT_ID AGENT_TYPE_CODE AGENT_TYPE_PREFIX CELL PHONE OFF FAX --------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------
29709 RE OFFICE ROB 29709 RE OFFICE 4805551436 1111111111 2223334444 5556667788 1234 RE OFFICE MIKE Currently, I run this query and I get the output as below
SELECT *.
AGENTS HAS
LEFT OUTER JOIN AGENT_PHONE AP
ON A.AGENT_ID = AP. AGENT_ID
AND A.AGENT_TYPE_CODE = AGENT_TYPE_CODE.
AND A.AGENT_TYPE_PREFIX = AGENT_TYPE_PREFIX.
AGENT_ID AGENT_TYPE_CODE AGENT_TYPE_PREFIX NAME AGENT_ID AGENT_TYPE_CODE AGENT_TYPE_PREFIX PHONE_NUMBER PHONE_TYPE_CODE 1 29709 RE OFFICE ROB 29709 RE OFFICE 4805551436 CELL 2 29709 RE OFFICE ROB 29709 RE OFFICE 1111111111 PHONE 3 29709 RE OFFICE ROB 29709 RE OFFICE 2223334444 OFF 4 29709 RE OFFICE ROB 29709 RE OFFICE 5556667788 FAX 5 1234 RE OFFICE MIKE I want id 29709 agent in a line with 1234 agent also id to display
You can rotate your phone number of agent in columns
Select *.
of AGENT_PHONE
pivot)
min (PHONE_NUMBER)
for PHONE_TYPE_CODE in ('CELL' as a 'CELL', 'PHONE' like 'PHONE', 'OFF' in the 'OFF', 'FAX' as 'FAX')
)
AGENT_ID AGENT_TYPE_CODE AGENT_TYPE_PREFIX CELL PHONE OFF FAX 29709 RE OFFICE 4805551436 1111111111 2223334444 5556667788 Then you can join to view inline or CTE
with AGENT_PHONE_PIVOT like)
Select *.
of AGENT_PHONE
pivot)
min (PHONE_NUMBER)
for PHONE_TYPE_CODE in ('CELL' as a 'CELL', 'PHONE' like 'PHONE', 'OFF' in the 'OFF', 'FAX' as 'FAX')
)
)
SELECT *.
AGENTS HAS
LEFT OUTER JOIN AGENT_PHONE_PIVOT AP
ON A.AGENT_ID = AP. AGENT_ID
AND A.AGENT_TYPE_CODE = AGENT_TYPE_CODE.
AND A.AGENT_TYPE_PREFIX = AGENT_TYPE_PREFIX.
AGENT_ID AGENT_TYPE_CODE AGENT_TYPE_PREFIX NAME AGENT_ID AGENT_TYPE_CODE AGENT_TYPE_PREFIX CELL PHONE OFF FAX 29709 RE OFFICE ROB 29709 RE OFFICE 4805551436 1111111111 2223334444 5556667788 1234 RE OFFICE MIKE - - - - - - - Is that what you're looking for?
-
Columns and rows of data have disappeared to chart
Hello-
I don't know what happened, but the rows/cells disappeared to my data in a bar graph in Illustrator CS5.5.
The first number indicates upward, so I have to keep hitting tab, but they are not divided into visible cells longer. Please see the image below. I often see rows and columns in Excel. Any help is greatly appreciated!
That's what it should look like:
What to say when you select the chart and find in appearance.
If your don't have a transparenacy flatten on your chart then it seems group, rasterize would say image and you can no longer change the chart because the chart is more dynamic.
Could possibly have CS6 file open in CS5. You graphics I bleive dissociated bevoems then, at least in the basic test I did.
-
Columns and rows created are not the same in a browser as in DW
I tried to create 5 column using CSS. I was very happy when it worked, and it worked on mine! So before you start to copy my code for created about 19 lines of the same columns that I created, I looked in a browser to see that it is in every sense.
I did put the direct page because I don't want my potential customers, seeing this, but if I have to for someone to help me I'll do it. My images will jump to the right of the screen in a browser, but as in DW said everything looks good. Hope someone can help me please.
< div id = 'column-container-full hunting' >
< div id = "column-container-left" > * of HERE IS MY HTML
< /P > < p > DESIGN
< / div >
< div id = "column-container-Center" > < DETAILS P > < /P >
< / div >
< div id = 'column-container-right' > < BUDGET P > < /P >
< / div >
< div id = "column-container-rightA" > < STANDARD P > < /P >
< / div >
< div id = "column-container-rightB" > < PREMIUM P > < /P >
< / div >
< / div > <! - column-cotainer-full hunting end - >
< div id = 'column-container-full hunting' >
< div id = "column-container-left" >
"< img src="images/photos/21.jpg "width ="297"height ="234"alt ="field of 12 x 24 shelter"/ > < / div >
< div id = "column-container-Center" >
SHELTER 12 x 12 < P > < /P >
< P > skates in wood 12 X 12 < /P >
< P > kick panels OSB 11 MM < /P >
< P > Kick Boards PLY 12MM < /P >
< /P > < P > wooden DOOR
< /P > < P > SKIP TRACK
< / div >
< div id = "column-container-right" >
< P >£ 750 < /P >
< P > < /P > 150
< P >£ 90 < /P >
< P > < /P > 120 pounds
< P > < /P > £150
< P >£ 40 < /P >
< / div >
< div id = "column-container-rightA" >
< P >£ 1000 < /P >
< P > < /P > £150
< P >£ 90 < /P >
< P > < /P > 120 pounds
< P > < /P > £150
< P >£ 40 < /P >
< / div >
< div id = "column-container-rightB" >
< P >£ 1300 < /P >
< P > < /P > £150
NA < P > < /P >
INCLUDED in the < P > < /P >
< P > < /P > £150
< P >£ 40 < /P >
< / div >
< / div > <! - column-cotainer-full hunting end - >
< div id = "footer" >
< ul >
< li > < a href = "index.html" > home < /a > < /li >
< li > < a href = "stables.html" > stables < /a > < /li > ""
< li > < a href = "shelters.html" > shelters < /a > < /li > ""
< li > < a href = "gallery.html" > Gallery < /a > < /li > ""
< li > < a href = "pricelist.html" > price list < /a > < /li > "
< li > < a href = "usefulinks.html" > < /a > < /li > useful links "
< li > < a href = "contactus.php" > contact us < /a > < /li >
< /ul >
< class p 'foot of page-text' = > Copyright 2014 Bristol equestrian Services < /p >
< / div > <! - end of footer - >
< / div > <! - end wrapper - >
< / div > <! - end outerWrapper - >
< / body >
< / html >
CSS
#column - container - full-width {width: 100% ;}} }
{#column - container - left
Width: 300px; float: left; }
{#column-container-Center}
Width: 300px; float: left; }
{#column - container - right
Width: 100px; float: left; }
{#column-container-rightA}
Width: 100px; float: left; }
{#column-container-rightB}
Width: 100px; float: left; }
Try adding overflow: hidden; and see if that solves the problem:
{#column - container - full-width
Width: 100%;
overflow: hidden;
}
-
Tabular: how dynamically toggle columns and rows
Hello
I am very new to ApEx sorry if this has been addressed before, but I can't find a solution in forums or with Google, so here I am.
I have an table based on a view, with two elements as the primary key and instead - of trigger for update (only the updates made, not of insertions/deletions) and the form works fine (I can update and refresh, etc.) The form was created with the wizard, not manually.
My problem is, I need to turn off (disable - not hide) of columns in the report to prevent changes according to the value of one of its own columns - for example, a value of + 'q' + in the column period is going to turn some columns, while value of + 'h' + will toggle other columns. (The 'q' / 'h' value is the same for all the lines in the form.)
Similarly, I also need to toggle all lines according to the value of the column one another .
To sum up, displaying the form of tables and according to the value of a column, I need to turn some of the columns. Thenfor each line that I sail and, according to the value of another of the column, I need to enable/disable one or more items on this line.
Any detailed help on how to proceed would be greatly appreciated (and if you need more information please ask.)
It was very easily in forms with the triggers when-new-record and the elements of parameters as enabled. I am really so confused as to how to do this with ApEx - not to mention that I am helpless with JavaScript... Given that the page works well with the wizard-generated form, I want to keep it this way, but I'm ready to learn new tricks if the solution is building manually (as explained here: http://www.oracle.com/technology/products/database/application_express/howtos/tabular_form.html) or do it with a dynamic query (as explained here: http://www.oracle.com/technology/products/database/application_express/howtos/dynamic_report.html) although I'm not sure to understand things , explained here (and if she needs clean MRU treat...?)
Thanks in advance,
LudovicYou are the very welcome. I had a lot of help at the beginning of this forum so I try my best to give back. :)
Good luck for the demo!
-
v$ flash_recovery_area_usage has zero in all columns and rows
Hi all
could you give an opinion on the 'question' I with the database server Oracle 10.2.0.5 on a linux machine.
SYS@test10u AS SYSDBA> select * from v$flash_recovery_area_usage; FILE_TYPE PERCENT_SPACE_USED PERCENT_SPACE_RECLAIMABLE NUMBER_OF_FILES ------------ ------------------ ------------------------- --------------- CONTROLFILE 0 0 0 ONLINELOG 0 0 0 ARCHIVELOG 0 0 0 BACKUPPIECE 0 0 0 IMAGECOPY 0 0 0 FLASHBACKLOG 0 0 0
-
Customize the table (first column and the first row)
Hello everyone, I have a question: How can I insert words and numbers in the same table?
I have create a VI that measure the temperature with an external instrument and put the data into a table, which is saved.
Each line is a Thermocouple and each column is a measure, but there are only numbers!
I would have the first column with the name of the channel and line of fist with the name of the measure.I had create an excel for example to explain my wish (Cattura.PNG).
Thanks to all who help me
You can insert headers required as column and row to convert it to an array of strings, as in the image below.
-
How can I know the number of columns and lines on excel file
How reading the number of columns and rows on an excel file after you open the file in excel with ActiveX.
Using the example of excel200dem, I read that the file data is excellent.
However, in this example, I just give the number of lines and columns.
I want to know the number of lines and columns not giving those in C code automatically.
Who knows this things? -?
Help me please.
Hello
(1) this forum provides a search option, you must use in doing so, you will find this post
(2) don't solve you your earlier questions? If so, you must mark responses that have helped you find a solution.
-
How to get the column and the row of winding of title in a custom section?
In default, the title of column and line's not winding print when the specification in the Chinese environment.
How to make them winding?
Thank you
Please change ExtendedAttributes$ xlate$ .xsl EASectionTable section of the file in the folder/reports/FO
as below: -
Compare multiple columns and return a different value
I have more access to excel and I'm running my previous workflow in numbers of duplication of issues.
I have a worksheet when a sheet with all my power tools. On the "Power Tools" sheet I have columns for the brand, Type, model, purchase date, etc... An example of this would be: pass a "DEWALT", "Jackhammer" Col B, Col C "DCD995M2" and so on.
I have a second sheet in the same document which is my front end if you want. I wanted to have selections for this dynamic drop-down list but it seems it is not possible without scripts, but is not the immediate question yet I'm the mention the case where someone knows a good fix. The second sheet "Sorting Test", I created manually drop-down boxes, one in column A of the brand and the other in column B for Type. I'll choose the brand and type and I want numbers autofill the rest of this line based on these two selections.
Example:
In the 'Sort Test' sheet I select DEWALT in column A and I select the drill in column B and I want DCD995M2 is displayed in column C and the purchase date in column D and so on.
Excel in it would be a game table or something similar. So far every site and search google only gave a lot of people who try to do VLOOKUP or correspond to errors, but I've really met anyone corresponding to two distinct cells from two separate columns and return data from this same line a match was found on.
I must also mention I'm really trying to avoid adding a hidden line that combines some of these but I know it's the most noticeable work around.
Basically, I want to match two selections separated against two separate columns, and when it finds the match, I want it returns a different value of this corresponding line how I got everything just copy this formula on adjacent cells and simply adjust to the column in the same row matched.
I know that I shouldn't do this on separate sheets, but it's just a choice that I made a point of design.
Any help would be appreciated, because I'm trying to really get the most out of the numbers, especially with how it syncs between desktop and mobile and I have more access to Excel.
You can it as what you do and why? This will help us understand what drives the design. Leave out how to solve the problem,
also post screenshots can be very useful
Maybe you are looking for
-
How can I remove HP Smart Web Printing to always be there on the left side of my screen of Internet Explorer. I don't want to automatically be there. I'll find it when I need it. Thank you
-
Pavilion G4 w / AMD processor - where can I find a driver for the SM Bus controller?
Bought a G4 Pavilion - 1164CA and upgraded the HD with SSD and did a new install of Windows 7 x 64 Premium. The model has a processor AMD A6 - 3400M. Device Manager shows that a driver is missing for SM Bus controller. I checked the drivers HP page f
-
Hard Reset Factory - Vista problems
Hi all Since I reset my laptop back to factory settings (& I can't cancel this reset), Firefox and Vista were not making the long (I'm not having all the problems in one of my other browsers). I noticed that when I'm trying to upload a photo or some
-
De : Regina_Miami Good eveningToday, I tried to download my emails in Windows Mail. I got the following error message: Account: 'pop.ig.com.br', server: 'pop.ig.com.br', Protocol: POP3, server response: '-ERR AVG POP3 Proxy Server: cannot connect to
-
Hi I'm Philipp, and I hope you can help me with this problem: My system is a Win7 64 bit old for two months on a Toshiba Tecra Notebook z50. During the first-updates Windows appears the first Bluescreen. I tried to solve the problem 0x0000009f DRIVER