Using Narrative View how to show multiple rows as one row
My answer result set Returns 3 rows
Year Rev
2005 $100
2006 $200
2007 $300
I want to display in a single line like
2005 $100 2006 $200 $2007 300
How do I achieve the above?
obieefan,
Add narrative view to compund layout and in the narrative area add @1@2...
@1 refers to year column
@2 refers to dollar amount column.
mark posts promptly
J
-bifacts
http://www.obinotes.com
Edited by: bifacts on Nov 12, 2010 9:26 PM
Similar Messages
-
How to show three more than one row as single row
for example there are two tables employee and department.
emp id dept_id
101 1
101 2
101 3
Due to different dept id i am getting three rows for same emp id. Is there anwyay i can show one row and all three departments into one line.
output like this 101 1/2/3
Please help!
Thanks864470 wrote:
However, I am not getting any distinct values for that.Are you sying there are multiple records for same emp_id, dept_id combination? If so:
SQL> with t as (
2 select 101 emp_id,1 dept_id from dual union all
3 select 101,2 from dual union all
4 select 101,2 from dual union all
5 select 101,3 from dual
6 )
7 -- end of on-the-fly data sample
8 select emp_id,
9 rtrim(xmlagg(xmlelement(d,dept_id,'/').extract('//text()') order by dept_id),'/') dept_list
10 from t
11 group by emp_id
12 /
EMP_ID DEPT_LIST
101 1/2/2/3
SQL> with t as (
2 select 101 emp_id,1 dept_id from dual union all
3 select 101,2 from dual union all
4 select 101,2 from dual union all
5 select 101,3 from dual
6 )
7 -- end of on-the-fly data sample
8 select emp_id,
9 rtrim(xmlagg(xmlelement(d,dept_id,'/').extract('//text()') order by dept_id),'/') dept_list
10 from (
11 select emp_id,
12 dept_id
13 from t
14 group by emp_id,
15 dept_id
16 )
17 group by emp_id
18 /
EMP_ID DEPT_LIST
101 1/2/3
SQL> SY. -
How to get multiple records in one row and different column
Hi All,
I am using oracle database 11g
and i have a two tables table_1, table_2
table_1 having columns
emp_no
first_name
middle_name
last_name
email
and table_2 having columns
emp_no
phone_type
phone_number
and having entires
emp_no phone_type phone_number
1001 MOB 9451421452
1001 WEMG 235153654
1001 EMG 652341536
1002 MOB 9987526312
1003 WEMG 5332621456
1004 EMG 59612356
Now i want the output of values with phone type as MOB or WEMG in a single row with different columns
emp_no first_name middle_name last_name email mobile officeno
1001 mark null k [email protected] 9451421452 235153654
1002 john cena gary [email protected] 9987526312 null
1003 dany null craig [email protected] null 5332621456
1004 donald finn sian [email protected] null null
can i have any inputs to achive this???
Regards
$sidFrank Kulash wrote:
sonething like this:Frank, you missed aggregate function (pivot requires one). However main thing is it will cause ORA-01748:
with table_1 as (
select 1001 emp_no,'mark' first_name,null middle_name,'k'last_name,'[email protected]' email from dual union all
select 1002,'john','cena','gary','[email protected]' from dual union all
select 1003,'dany',null,'craig','[email protected] null' from dual union all
select 1004,'donald','finn','sian','[email protected]' from dual
table_2 as (
select 1001 emp_no,'MOB' phone_type,9451421452 phone_number from dual union all
select 1001,'WEMG',235153654 from dual union all
select 1001,'EMG',652341536 from dual union all
select 1002,'MOB',9987526312 from dual union all
select 1003,'WEMG',5332621456 from dual union all
select 1004,'EMG',59612356 from dual
SELECT *
FROM table_1 t1
JOIN table_2 t2 ON t1.emp_no = t2.emp_no
PIVOT ( max(t2.phone_number)
FOR t2.phone_type IN ( 'MOB' AS mob
, 'WEMG' AS wemg
FOR t2.phone_type IN ( 'MOB' AS mob
ERROR at line 19:
ORA-01748: only simple column names allowed hereYou need to:
with table_1 as (
select 1001 emp_no,'mark' first_name,null middle_name,'k' last_name,'[email protected]' email from dual union all
select 1002,'john','cena','gary','[email protected]' from dual union all
select 1003,'dany',null,'craig','[email protected] null' from dual union all
select 1004,'donald','finn','sian','[email protected]' from dual
table_2 as (
select 1001 emp_no,'MOB' phone_type,9451421452 phone_number from dual union all
select 1001,'WEMG',235153654 from dual union all
select 1001,'EMG',652341536 from dual union all
select 1002,'MOB',9987526312 from dual union all
select 1003,'WEMG',5332621456 from dual union all
select 1004,'EMG',59612356 from dual
table_3 as (
select t1.emp_no,first_name,middle_name,last_name,email,
phone_type,phone_number
FROM table_1 t1
LEFT JOIN table_2 t2 ON t1.emp_no = t2.emp_no
SELECT *
FROM table_3
PIVOT ( max(phone_number)
FOR phone_type IN ( 'MOB' AS mob
, 'WEMG' AS wemg
EMP_NO FIRST_ MIDD LAST_ EMAIL MOB WEMG
1004 donald finn sian [email protected]
1003 dany craig [email protected] null 5332621456
1001 mark k [email protected] 9451421452 235153654
1002 john cena gary [email protected] 9987526312
SQL>SY. -
How to show multiple curves in one xy graph.
I can get the temprature ,humidity and co2 data from sensors.Now l want to show them in one xy graph, and the x-axis shows the absolut time. I already set different y-axis, and tried many ways, but still can't get three curves.
The numer of x points needs to be the same as the number of y points.
Each plot needs to be an array, currently you only have a single plot with 3 points.
Your property nodes are not necessary.
What determines the loop rate?
Please attach your VI instead of a picture. We cannot tell how the express Vi is configured. (e.g. is it set to retain data? You would probably run out of memory pretty quickly.)
If the timing (=loop rate) is regular, you might be better off with a chart instead. -
Problem in displaying multiple column values using Narrative View
Hi All,
I have a requirement where in I need to display column 1 of an Answers report as a header and all values of column 2 below tht.
There are multiple values from column 2 for every value in column 1
Example:
Group:
Grp (This is column 1)
Activity:
Act1
Act2
Act3 (These are values from column 2)
I have used narrative view for this which looks like:
Group: @1
Activity:@2[br/]
But this displays the value of column1 along with every value of column 2. I want column 1 value to be displayed only once.
Thanks in advance
RadhikaHi see this link it may helpful
Re: Narrative view not showing up in the report
Re: how to transpose columns to rows in OBIEE
Regards
Naresh -
How to show multiple records in JDeveloper automatically
Hi, you guys,
May I ask you how to show multiple records, say consecutive three records, of a View object in JDeveloper?
I know that we can just drag and drop a view object as a child (Table) of a scrollPane.
Are there any other approaches?
Thanks a lot for your time.
damonThanks for your reply.
You are right.
Table binding is the best solution for that.
But in my mind, a record in a table is always shown in one row (or one line), am I right?
If so, it is not convient to show records with multitple columns.
Let's say, there are 20 columns to show for each record. Then we should display a record in, say 3 lines.
How can we do that?
Are there any suggestions?
I am thinking that maybe I can use secondary row set iterators for that since we can create two or more row set iterators for the same view object.
Assume I want to show three consecutive records. I can use attribute binding to show the current record in three lines by dragging attributes one by one from Data Control Palette to Design Window as Child | TextField;
But I do not know how to use a secondary row set iterator for the next record. Where shall I create a secondary row set ietrator such that I can use it to create and synchronize the bindings.
Thanks a lot
Damon
Message was edited by:
user599641 -
Dashboard Prompt (All Choices) using Narrative View
Using Narrative View I can display LOVs of Prompt but when the (All Choices) selected, how to display using Narrative View?
In Your criteria Create a column with foruma like the below
CASE WHEN '@{psitename}{All}' = '' THEN 'ALL' else '@{psitename}{All}' end
And now in your narrative of the report, Add @2 if the above column is in second place of criteria. Add this narrative in you compound layout. Hide the column if you dont want show it in table view.
This code works in 3 cases.
1. If variable is null then it shows default value - All
2. If variable is selected to all choices then it shows ALL
3. If you select any site, that shows site name.
let me know if does not work for you..
- Madan -
I wanted to display the multiple rows in one row but column should be diff
Hi
Could any body help me regarding this query how to write to get the multiple rows in one row.
eg.
i have one table tab1(eno number,ename varchar2,uid1 varchar2,uid2 varchar2,uid3 varchar4)
but when i am runing the query I am getting multiple record against one eno number because of uid1,uid2,uid3
suppose value of table is
eno ename uid1 uid2 uid3
1 a u1
1 a u2
1 a u3
when i am quering it is coming same as above but I want in one row
eno ename uid1 uid2 uid3
1 a u1 u2 u3
can any onle help me how to write the query for this requirement.
thanks
saifwhich is hard coded in my code? Here another approach, but fail for c as there is no information for the value of a column: does 1 in u1 means col 1, etc.
/* Formatted on 2012/05/29 16:29 (Formatter Plus v4.8.8) */
WITH t AS
(SELECT 1 col1, 'a' col2, 'u1' col3
FROM DUAL
UNION ALL
SELECT 1 col1, 'a' col2, 'u2' col3
FROM DUAL
UNION ALL
SELECT 1 col1, 'a' col2, 'u3' col3
FROM DUAL
UNION ALL
SELECT 1 col1, 'b' col2, 'u1' col3
FROM DUAL
UNION ALL
SELECT 1 col1, 'b' col2, 'u3' col3
FROM DUAL
UNION ALL
SELECT 1 col1, 'b' col2, 'u2' col3
FROM DUAL
UNION ALL
SELECT 1 col1, 'c' col2, 'u1' col3
FROM DUAL
UNION ALL
SELECT 1 col1, 'c' col2, 'u3' col3
FROM DUAL)
SELECT xx.col1, xx.col2, MAX (DECODE (xx.rn, 1, col3)) AS uid1, MAX (DECODE (xx.rn, 2, col3)) AS uid2,
MAX (DECODE (xx.rn, 3, col3)) AS uid3
FROM (SELECT t.col1, t.col2, t.col3, ROW_NUMBER () OVER (PARTITION BY col1, col2 ORDER BY col3) rn
FROM t) xx
GROUP BY col1, col2;output:
COL1 COL2 UID1 UID2 UID3
1 a u1 u2 u3
1 b u1 u2 u3
1 c u1 u3
Edited by: ʃʃp on May 29, 2012 2:30 AM -
How to execute multiple queries in one stored procedure.
Hi,
I am Kumar,
How to execute multiple queries in one stored procedure.
here is the my requirements,
1. get the max value from one table and sum of the that value.
2. insert the values and also sum of the max value.
using stored procedure
I am using SQL server 2000 database.
Please help me.
Advance thanks
by,
KumarThis is not a java question and it is not even a problem: your only problem is
1) lack of knowledge
2) lack of interest to find a manual
But you are going to have to change both by actually reading a book or a manual that explains the stored procedure language of SQL Server. It is the same as Sybase I think, so you could also look for a manual for that DBMS. -
How to print multiple copies on one page ?
How to print multiple copies of one document on one page ?
in coreldraw I used to make the document -for example a business card 5x9 - and when sending to print it automatically placed the number of cards that would fit in my A4 sheet.
how do I make the same operation in Indesign.
thanksHi, Peter S.
>I can see that as a shortcut to printing a page of different cards for multiple people, but to do a simple n-up of a single card it seems overly complex to me. What am I missing?
* It's just an alternative to copy/paste and step/repeat.
* For a one-time only use, perhaps it's a little more complex than necessary. But for any future needs, only the content of the data file needs to be changed, either by editing, or by pointing to a new data file. If different cards for multiple people becomes necessary, it's ready to go.
Regards,
Peter Gold
KnowHow ProServices -
How to scan multiple pages in one file
I would like to know how to scan multiple pages into one file. There is no add button that comes up. I have a HP Officejet 8600 and a macbook pro. Please help, this would really help me out.
Open Preview and use its "Import From Scanner" option in the File menu. This will launch the scanning interface, which has some standard and basic scanning controls. If you choose "PDF" as the file format to save as, then you will see an option to scan all images to one file. When you do this, you will scan and edit them individually, but Preview will save them to the same file when saved.
-
Hp printer f4488 HOW TO SCAN MULTIPLE SHEET IN ONE ATTACHMENT
hp printer f4488 HOW TO SCAN MULTIPLE SHEET IN ONE ATTACHMENT Kindly suggest if any solution are their for above subject..
Open Preview and use its "Import From Scanner" option in the File menu. This will launch the scanning interface, which has some standard and basic scanning controls. If you choose "PDF" as the file format to save as, then you will see an option to scan all images to one file. When you do this, you will scan and edit them individually, but Preview will save them to the same file when saved.
-
I'm trying to organize my PDFs in iBooks on my ipad2 and can't figure out how to combine multiple PDFs into one. Any thoughts?
I'm trying to organize my PDFs in iBooks on my ipad2 and can't figure out how to combine multiple PDFs into one. Any thoughts?
-
How do you delete more than one row on numbers?
how do you delete more than one row on numbers?
Hi operatorcarmax,
Select the Rows (shift click works for me). Then hover the cursor over any selected Row label to see the upside-down triangle. Click on it to see a Pop-up menu.
The Numbers User Guide is available for download under the Numbers Help Menu. A good read.
Regards,
Ian. -
I have 3 drop down boxes in my report done SQL SSRS .. I want t to put them in the same row (just one row) ..how can I do it.?
Hi Sashi123,
Just as Ivan said, we do not have the ability to change the Report Manager in this way. Because we can’t change the parameters locations as this is not supported to write expressions for the location of parameters.
While we can build a custom application in Visual Studio that we can get it through codes after deploying the report, then through URL we can get it by customization.
Hope this helps.
Thanks,
Katherine Xiong
Katherine Xiong
TechNet Community Support
Maybe you are looking for
-
In PO No delivery type defined for supplying plant and document type MRO
Hi, i need urgent solution for this problem please. i am getting this error while creating stock transport order PO(intercompany) No delivery type defined for supplying plant (ex:1500) and document type MRO . thanks madhu
-
IWeb publishes, but there is no change to the site on .MAC
I have had a recent problem, where i apply changes in iWeb, publish them successfully (according to the program) and then try and visit them to find an unchanged site. How do I trouble shoot this? Thanks MZ
-
Initialize a date using eCATT and a file
We are trying to clear the values in a date field (MBEW-ZKDAT), i.e. we're trying to update the field from some date to the initial value. We have an eCATT that has been working fine when there is some value in the date field. But when we try to put
-
I upgraded to PhotoShop CC 2014 and can no longer access my NIK Collection. It worked fine in PhotoShop CC? What can I do?
-
Restore from desired backup file
Hi, I am new with oracle and RMAN. Can we restore database from desired/certain backup file? how to do that? Thank's Tatang