Displaying a row vertically
Hi, i require help.
i have to do a report. i have about 7 different date columns, that i need to display as one column. and the other column that i need to display is a date description column, that uses the 7 column heading.
eg tables
start date | end date | due date
05 - jan -07 29-feb-07 01- mar-07
eg. needs to display in report like this:
date | date description
05 - jan-07 start date
29 - feb -07 end date
01 - mar- 07 due date
The following generic function may be used to twirl a list of columns within a table with an optional where.
CREATE TYPE TWIRLED_O AS OBJECT ( ID NUMBER, ATTRIBUTE_NAME VARCHAR2(30), THE_VALUE VARCHAR2(4000));
CREATE TYPE TWIRLED_MS AS TABLE OF TWIRLED_O
CREATE TYPE COLUMN_LIST AS TABLE OF VARCHAR2(30)
CREATE OR REPLACE FUNCTION thaitw(
p_table IN VARCHAR2
,p_column_list IN column_list
,p_the_where IN VARCHAR2 DEFAULT ' 1=1 '
RETURN twirled_ms PIPELINED
AS
v_stop_key NUMBER;
BEGIN
EXECUTE IMMEDIATE 'SELECT COUNT(*) FROM '
|| p_table
|| ' WHERE '
|| p_the_where
INTO v_stop_key;
FOR I IN
WITH twirled AS
(SELECT half_ample.SEQUENCE ID
,EXTRACTVALUE(DBMS_XMLGEN.getxmltype( 'SELECT '
|| column_name
|| ','''
|| column_name
|| ''' LABEL FROM '||p_table||' WHERE '||p_the_where), '/ROWSET/ROW['
|| half_ample.SEQUENCE
|| ']/'
|| column_name) the_data
,column_name the_header
FROM (SELECT column_name
FROM dba_tab_columns
WHERE table_name = p_table
AND owner = SYS_CONTEXT('USERENV','CURRENT_USER')
AND column_name MEMBER OF p_column_list ) cols
,(SELECT ROWNUM SEQUENCE
FROM DUAL
CONNECT BY LEVEL <= v_stop_key) half_ample)
SELECT ID
,the_header
,the_data
FROM twirled
ORDER BY ID
,the_header ) LOOP
PIPE ROW ( TWIRLED_O(I.ID, I.THE_HEADER, I.THE_DATA ) );
END LOOP;
END;
/Yielding results as follows:
SQL> desc pivot_me
Name Null? Type
ORDERED_DATE DATE
DUE_DATE DATE
DELIVERED_DATE DATE
ID NUMBER
SQL> select * from pivot_me;
ORDERED_DAT DUE_DATE DELIVERED_D ID
01-DEC-2007 24-DEC-2007 20-DEC-2007 1
09-DEC-2007 24-DEC-2007 03-JAN-2008 2
03-DEC-2007 15-DEC-2007 23-DEC-2007 3
SQL> select * from table ( thaitw('PIVOT_ME',COLUMN_LIST('ORDERED_DATE','DUE_DATE','DELIVERED_DATE')));
ID ATTRIBUTE_NAME THE_VALUE
1 DELIVERED_DATE 20-DEC-2007
1 DUE_DATE 24-DEC-2007
1 ORDERED_DATE 01-DEC-2007
2 DELIVERED_DATE 03-JAN-2008
2 DUE_DATE 24-DEC-2007
2 ORDERED_DATE 09-DEC-2007
3 DELIVERED_DATE 23-DEC-2007
3 DUE_DATE 15-DEC-2007
3 ORDERED_DATE 03-DEC-2007
..
Similar Messages
-
TO Display the row data as column in ALV
Hi experts ,
Need to display the row data in ALV as column.
The column of an ALV has the fieldnames of a table , this needs to be displayed as row data , that is as single row.
How can this can be achieved?Hi,
Actually it is not possible to disaply in multiple lines.
https://www.sdn.sap.com/sdn/collaboration.sdn?contenttype=url&content=https%3A//forums.sdn.sap.com/thread.jspa%3FforumID%3D50%26threadID%3D49517%26messageID%3D506378%23506378
https://www.sdn.sap.com/sdn/collaboration.sdn?contenttype=url&content=https%3A//forums.sdn.sap.com/thread.jspa%3FforumID%3D50%26threadID%3D41133%26messageID%3D403371%23403371
This problem was discussed many times in this forum, u can search for more results. -
HI ALL,
I'm using jdeveloper 11.1.1.2.0 with ADF 11g.
I have to display the values in jsf frm table where i'm using DislayCertDetailVO . In dis VO i'm having a column no.of certificaties .taking dis column value when i navigate to other page jsf by selecting a specific row. here i have to display the selected row in multiple times based on the no.of.certificates column value.
I want to display specific row to display multiple time to repeat same row in a table in jsf based on the value from bean or table in database.
Edited by: user9010551 on Apr 28, 2010 6:14 AM
Edited by: user9010551 on Apr 28, 2010 10:33 PMHi, Trying it once more to give more clarity of my scenario.
I have to navigate from 1 screen to the other by picking a given table record/row from the 1st screen. While displaying the record on the 2nd screen the catch is that, I have to display it as many times as the value in a cell of the selected record.
eg.
screen 1
col1 col2 col3
2 order1 item1
[next]
On clicking next it should look like
screen2
col1 col2 col3 col4
order1 item1
order1 item1
where col3 and col4 will be editable by the user and col1 is the value depends how many times i have repeat the row/record
Hope this give more clarity. -
How to display first row value returened from a query as checked as default in a report
How to display first row value returned from a query as checked as default in a report
Example
Parameter 1
Paramerter2
ABD
x(checked)
Test
DEF
JMG
MudassarHi Mudassar,
The issue is caused by the order in which the parameters appear in the report data tab can be difference between our report execution and it failing. In other words, “Parameter2” is execution before parameter “A” due to this issue. We can adjust the parameter’s
order to solve the issue.
If “Parameter2” is parameter “A”, we cannot use that expression. Because fields cannot be used in report parameter expression, if we want to display the first value returned from a query as default value, we have to fill the “Specify values” text box with
the specific value in Default Values dialog box.
Regards,
Alisa Tang
Alisa Tang
TechNet Community Support -
Input ready query and display only rows
I am trying to replicate scenario which is equivalent to creating manual layout in SEM-BPS with settings for layout category - Key Figures in Data columns, and rows defined individually. In this version it is possible to restrict certain rows as comparision only.
How can I acheive this using Input ready query? In my query I have created a strucure for Planning Items, but I am not able to show certain planning item selections as display only.
Any thoughts?Hello Gregor,
Thanks for you answer.
I already have two structures as mentioned by you.
Can you please let me know what exactly you meant by set the input flag on the cell level? What settings I have to change to set the flag, do I have to use any formula? In my example I have three rows for Planning item row structure and I want only one row to be selected as display only row.
Regards,
Sachin -
In PSE 7, how can I rotate my video, which displays sideways, to vertical?
How can I rotate my video which displays sideways to vertical in PSE 7?
It's a waterfall, I filmed it vertically, but it displays horizontally. Full Edit doesn't work on film clips and the rotate option is greyed out.
Thanks for any feedback.
KathrynPSE 7 is Ps Elements, not Photoshop. Try posting in the Photoshop Elements forum, as not many users here are familiar with Elements.
http://forums.adobe.com/community/photoshop_elements?view=discussions -
Can we display comments row for row in Input Ready Query...
Dear All,
Currently I have created Web template with Signle Document. When executed it in the Portal it will come up with a "Save" and "Cancel" button of its own and can allowing me to capture comment here & Finally Click on SAVE button which was stored in Documents area in RSA1.
Now I am was trying to figure out to display comments Row for Row in Input Ready Query...
Can you give ideas on this...Check link http://help.sap.com/saphelp_nw04/helpdata/en/1e/99ea3bd7896f58e10000000a11402f/frameset.htm
In query properties in BEx query designer you have to do settings to - Display document links
For metadata, master data, and InfoProvider data for a query, you can display links to Documents that you have created for these objects. If documents exist for these objects, the symbol appears next to these objects. If you click on this symbol, you jump to where the document is displayed on the Web.
Highlight the appropriate setting so that the document links for the desired document class are displayed. The document classes are oriented to the various categories of BW objects. InfoProvider data, metadata and master data. -
How to display the rows number of times by giving the column values?
Hi All,
I want to display the rows number of times as the value exists in num column in the below query
with t AS
( SELECT 'venkatesh' NAME, 'hyd' LOC, 2 NUM FROM DUAL
UNION ALL
SELECT 'prasad' NAME, 'hyd' LOC, 3 NUM FROM DUAL
UNION ALL
SELECT 'krishna' NAME, 'hyd' LOC, 1 NUM FROM DUAL )
SELECT T.* FROM T
CONNECT BY ROWNUM <= NUM
Expected output:
venkatesh hyd 2
venkatesh hyd 2
prasad hyd 3
prasad hyd 3
prasad hyd 3
krishna hyd 1Edited by: Nag Aswadhati on Nov 1, 2012 12:34 AMNag Aswadhati wrote:
Hi All,
I want to display the rows number of times as the value exists in num column in the below query
Expected output:
venkatesh hyd 2
venkatesh hyd 2
prasad hyd 3
prasad hyd 3
prasad hyd 3
krishna hyd 1Using Connect By:-
with t AS
( SELECT 'venkatesh' NAME, 'hyd' LOC, 2 NUM FROM DUAL
UNION ALL
SELECT 'prasad' NAME, 'hyd' LOC, 3 NUM FROM DUAL
UNION ALL
select 'krishna' name, 'hyd' loc, 1 num from dual )
select t.name, t.loc
from t
connect by level <= num
and name = prior name
and (prior sys_guid() is not null);
NAME LOC
krishna hyd
prasad hyd
prasad hyd
prasad hyd
venkatesh hyd
venkatesh hyd
6 rows selected -
JTable display colmun name vertical
Hi,
i have to display a JTable, but the column width is small and the colmun heading has lot of text and so cannot fit , is there a way i can increase the height of the column header and display the text vertically,
just like we can do in Exceel sheet...
any hint or code will be appreciated
AshishTryadd (new JScrollPane (createTable ()));or add the header separately.
Kind regards,
Levi -
How to display more rows in Master-detail form
I am working on APEX3.2.
I have a master-detail form. The detail form always display 15 rows. However, my customer wants the detail display all the rows. I tries to configure the Number of Rows in the report. It doesn't work. How do I do it?
Thanks a lot!Hi:
To increase number of rows displayed you have to set Number of Rows and pay attention to both Number of Rows (Item) and Maximum Row Count.
After that if didn't work, sign out or close the browser then open it again. Sometimes it keeps the value in current session.
Saad, -
Displaying front row on external monitor (extended desktop)
Hi,
I've buyed a MacBook (black) and a VGA cable to connect to an external monitor. I've configured as extended desktop, no problem to work with regular apps...
But i would like to display Front Row on the external monitor, and not on the internal... it should be possiible as i see many people talking about this kind of configuration, but i do not success...
Can someone tell me how to display front row on the external monitor, or point me where i can configure front row ?
Thanks in advanceThanks, it's a good beginning, but it make the external display also the default for everything else like menu bar,... i do not want to use the whole macbook on the TV, i just want to use the DVD, video clips, photos,... on the TV... it seems for me a regular use : using the mac for the softwares,... and the TV only for the multimedia display...
-
Query for how to display unique rows in a table
Can i have a query for displaying unique rows in a table.
use d query
select distinct col1,col2... from table ; -
Displaying multiple rows in a form layout problem?
HI,
I displayed multiple rows using form layout,but form browse buttons displaying one row multiple times like if i click next it is displaying same rows in next page also ?
how can I prevent this?
very urgent
Thanks in advanceSet the table range size property to the number of rows you want to display.
Then as a post-generation action, drag and drop the Next Set and Previous Set operations of your View Object usage as buttons onto your page.
Then move the button code to a custom template, and uncheck group-level checkbox "Clear Page Definition before generation" to preserve the NextSet and PreviousSet action bindings.
Steven Davelaar,
JHeadstart Team. -
How to display 30 rows in a report
Hi
I am using apex.oracle.com to Generate one report.
report contains 30 rows and tried alot to display all rows without clicking next.
how i can get this.
thanx in advance.
ChanranThanx for your reply mini,
i am showing some settings in report attributes
report template template:1.standard
pagination scheme -mo pagination selected-
enable partial page refresh yes
display point bottom right
number of rows 20
but this is not working same problem i am facing
regards
Chanran
Edited by: Chandu on 19-Oct-2011 06:37 -
Display a table vertically in APEX
Hi Everybody, I am a developer and new to Oracle APEX. I have the below requirement. Anybody can Please help me asap?
I want to display a table vertically in my page. But Whatever i try, the table displays Horizantal only.
My requirements in pictorial as below. Thanks.
Emp name Joseph Ben Princess Robert
Age 21 26 20 41
Sex Male male female Male
Your help very much appreciated.If you're on database version 11g try a pivot table. http://www.oracle.com/technology/pub/articles/oracle-database-11g-top-features/11g-pivot.html
If your not yet on 11g this discussion shows an alternative way to create a pivot table. http://asktom.oracle.com/pls/asktom/f?p=100:11:0::NO::P11_QUESTION_ID:766825833740
Maybe you are looking for
-
TS3988 how do I delete an icloud account?
I need help. My phone was attached to my business. Now it is not. My employer is still the account on the icloud. How can I delete it? I've tried everything! When the directions say it changed it - it shows back up. I want my email and passwor
-
Media encoder renders soft video
I noticed that when I render out a .wmv file for clients to review, it is very soft when I check the interlacing option. I am using lower filed first material so this would obviously be the right option. If I don't chose that option, it must deinter
-
Message text available in java using RFC function module
Hello, I wrote a function module with the ABAP statement MESSAGE .... RAISING PARAMETER_ERROR The java developer gets the PARAMETER_ERROR but no message text. Is the any way (e.g. exception class) to get the message text also. Thanks
-
Looking for a Houston area contractor.
All, EM is looking for a local LabVIEW contractor to help us with additional projects. CLD or CLAD preferrered. Oilfeld experience, RT and FPGA is a plus. Contact: Kenneth Miller Erdos Miller 713-562-4315 [email protected] Local applicants only pleas
-
This problem occurs on both Windows and Mac platforms. Using Adobe CS1 CS2 & CS3. Windows using CS3 with windows XP operating system. Mac using 10.5.4 2 GB ram. When the object is filled the view can be magnified to the max. When switched to outline