Oracle 11g Pivot table
Hi,
I have 2 questions on the pivot query below:
1 - I want to have total by Country and Year
2 - I want to allow the use a dynamic year range (like year between 1990 and 2000)
Thanks,
Ribhi
select * from (
select CNTRY_NAME, MYYEAR,AM_AMOUNT
from yearly_lending t
pivot
sum(AM_AMOUNT)
for MYYEAR in (1974,1975,1976,1977,1978,1979,1980,1981,1982,1983,1984,1985,1986,1987,1988,1989,1990,1991,1992,1993,1994,1995,1996,1997,1998,1999,2000,2001,2002,2003,2004,2005,2006,2007,2008,2009)
order by CNTRY_NAME
Ribhi,
Although there are people here that could answer your question, it's better suited for the SQL forum as it's not Apex related.
PL/SQL
Regards,
Dan
http://danielmcghan.us
http://sourceforge.net/projects/tapigen
http://sourceforge.net/projects/plrecur
Similar Messages
-
Help with oracle 11g pivot operator
i need some help with oracle 11g pivot operator. is it possible to use multiple columns in the FOR clause and then compare it against multiple set of values.
here is the sql to create some sample data
create table pivot_data ( country_code number , dept number, job varchar2(20), sal number );
insert into pivot_data values (1,30 , 'SALESMAN', 5000);
insert into pivot_data values (1,301, 'SALESMAN', 5500);
insert into pivot_data values (1,30 , 'MANAGER', 10000);
insert into pivot_data values (1,301, 'MANAGER', 10500);
insert into pivot_data values (1,30 , 'CLERK', 4000);
insert into pivot_data values (1,302, 'CLERK',4500);
insert into pivot_data values (2,30 , 'SALESMAN', 6000);
insert into pivot_data values (2,301, 'SALESMAN', 6500);
insert into pivot_data values (2,30 , 'MANAGER', 11000);
insert into pivot_data values (2,301, 'MANAGER', 11500);
insert into pivot_data values (2,30 , 'CLERK', 3000);
insert into pivot_data values (2,302, 'CLERK',3500);
using case when I can write something like this and get the output i want
select country_code
,avg(case when (( dept = 30 and job = 'SALESMAN' ) or ( dept = 301 and job = 'SALESMAN' ) ) then sal end ) as d30_sls
,avg(case when (( dept = 30 and job = 'MANAGER' ) or ( dept = 301 and job = 'MANAGER' ) ) then sal end ) as d30_mgr
,avg(case when (( dept = 30 and job = 'CLERK' ) or ( dept = 302 and job = 'CLERK' ) ) then sal end ) as d30_clrk
from pivot_data group by country_code;
output
country_code D30_SLS D30_MGR D30_CLRK
1 5250 10250 4250
2 6250 11250 3250
what I tried with pivot is like this I get what I want if I have only one ( dept,job) for one alias name. I want to call (30 , 'SALESMAN') or (301 , 'SALESMAN') AS d30_sls. any help how can I do this
SELECT *
FROM pivot_data
PIVOT (SUM(sal) AS sum
FOR (dept,job) IN ( (30 , 'SALESMAN') AS d30_sls,
(30 , 'MANAGER') AS d30_mgr,
(30 , 'CLERK') AS d30_clk
this is a simple example .... my real life scenario is compliated with more fields and more combinations .... So something like using substr(dept,1,2) won't work in my real case .
any suggestions get the result similar to what i get in the case when example is really appreciated.Hi,
Sorry, I don't think there's any way to get exactly what you requested. The values you give in the PIVOT ... IN clause are exact values, not alternatives.
You could do something like this to map all alternatives to a common value:
WITH got_dept_grp AS
SELECT country_code, job, sal
, CASE
WHEN job IN ('SALESMAN', 'MANAGER') AND dept = 301 THEN 30
WHEN job IN ('CLERK') AND dept = 302 THEN 30
ELSE dept
END AS dept_grp
FROM pivot_data
SELECT *
FROM got_dept_grp
PIVOT ( AVG (sal)
FOR (job, dept_grp)
IN ( ('SALESMAN', 30)
, ('MANAGER' , 30)
, ('CLERK' , 30)
;In your sample data (and perhaps in your real data), it's about as easy to explicitly define the pivoted groups individually, like this:
WITH got_pivot_key AS
SELECT country_code, sal
, CASE
WHEN job = 'SALESMAN' AND dept IN (30, 301) THEN 'd30_sls'
WHEN job = 'MANAGER' AND dept IN (30, 301) THEN 'd30_mgr'
WHEN job = 'CLERK' AND dept IN (30, 302) THEN 'd30_clrk'
END AS pivot_key
FROM pivot_data
SELECT *
FROM got_pivot_key
PIVOT ( AVG (sal)
FOR pivot_key
IN ( 'd30_sls'
, 'd30_mgr'
, 'd30_clrk'
;Thanks for posting the CREATE TABLE and INSERT statements; that really helps! -
Oracle 11g - External Table/SQL Developer Issue?
Oracle 11g - External Table/SQL Developer Issue?
==============================
I hope this is the right forum for this issue, if not let me, where to go.
We are using Oracle 11g (11.2.0.1.0) on (Platform : solaris[tm] oe (64-bit)), Sql Developer 3.0.04
We are trying to use oracle external table to load text files in .csv format. Here is our data look like.
======================
Date1,date2,Political party,Name, ROLE
20-Jan-66,22-Nov-69,Democratic,"John ", MMM
22-Nov-70,20-Jan-71,Democratic,"John Jr.",MMM
20-Jan-68,9-Aug-70,Republican,"Rick Ford Sr.", MMM
9-Aug-72,20-Jan-75,Republican,Henry,MMM
------ ALL NULL -- record
20-Jan-80,20-Jan-89,Democratic,"Donald Smith",MMM
======================
Our Expernal table structures is as follows
CREATE TABLE P_LOAD
DATE1 VARCHAR2(10),
DATE2 VARCHAR2(10),
POL_PRTY VARCHAR2(30),
P_NAME VARCHAR2(30),
P_ROLE VARCHAR2(5)
ORGANIZATION EXTERNAL
(TYPE ORACLE_LOADER
DEFAULT DIRECTORY P_EXT_TAB_D
ACCESS PARAMETERS (
RECORDS DELIMITED by NEWLINE
SKIP 1
FIELDS TERMINATED BY "," OPTIONALLY ENCLOSED BY '"' LDRTRIM
REJECT ROWS WITH ALL NULL FIELDS
MISSING FIELD VALUES ARE NULL
DATE1 CHAR (10) Terminated by "," ,
DATE2 CHAR (10) Terminated by "," ,
POL_PRTY CHAR (30) Terminated by "," ,
P_NAME CHAR (30) Terminated by "," OPTIONALLY ENCLOSED BY '"' ,
P_ROLE CHAR (5) Terminated by ","
LOCATION ('Input.dat')
REJECT LIMIT UNLIMITED;
It created successfully using SQL Developer
Here is the issue.
It is not loading the records, where fields are enclosed in '"' (Rec # 2,3,4,7)
It is loading all NULL value record (Rec # 6)
*** If we remove the '"' from input data, it loads all records including all NULL records
Log file has
KUP-04021: field formatting error for field P_NAME
KUP-04036: second enclosing delimiter not found
KUP-04101: record 2 rejected in file ....
Our questions
Why did "REJECT ROWS WITH ALL NULL FIELDS" not working?
Why did Terminated by "," OPTIONALLY ENCLOSED BY '"' not working?
Any idea?
Thanks in helping.I don't think this is a SQLDeveloper issue. You will get better answers in the Database - General or perhaps SQL and PL/SQL forums.
-
Oracle 11g - External Table/Remote File Issue?
Oracle 11g - External Table/Remote File Issue?
=============================
I hope this is the right forum for this issue, if not let me, where to go.
We are using Oracle 11g (11.2.0.1.0) on (Platform : solaris[tm] oe (64-bit)), Sql Developer 3.0.04
We are not allowed to put files on the CSV file system (Server A), where DB instance is running. We are able place CSV files on another server(Server B), where DB instance is not running.
We are trying to use oracle external table to load text files in .CSV format.
How do we create a Directory (Create Directory) on Server A DB to point to File system of Server B?
Is it feasible?
Any idea?
Thanks in helping.The Solaris DBA should be able to mount the filesystem for you. Either that or you have to get creative transferring the file like this;
http://www.linkedin.com/groups/Getting-creative-external-table-preprocessor-140609.S.50474382?qid=ba673ce4-c4bb-40c5-8367-52bd2a2dfc80&trk=group_search_item_list-0-b-ttl&goback=%2Egmp_140609
Cheers
David -
Oracle 11g - External Table Issue SQL - PL/SQL?
Oracle 11g - External Table Issue?
=====================
I hope this is the right forum for this issue, if not let me, where to go.
We are using Oracle 11g (11.2.0.1.0) on (Platform : solaris[tm] oe (64-bit)), Sql Developer 3.0.04
We are trying to use oracle external table to load text files in .csv format. Here is our data look like.
======================
Date1,date2,Political party,Name, ROLE
20-Jan-66,22-Nov-69,Democratic,"John ", MMM
22-Nov-70,20-Jan-71,Democratic,"John Jr.",MMM
20-Jan-68,9-Aug-70,Republican,"Rick Ford Sr.", MMM
9-Aug-72,20-Jan-75,Republican,Henry,MMM
ALL NULL -- record
20-Jan-80,20-Jan-89,Democratic,"Donald Smith",MMM
======================
Our Expernal table structures is as follows
CREATE TABLE P_LOAD
DATE1 VARCHAR2(10),
DATE2 VARCHAR2(10),
POL_PRTY VARCHAR2(30),
P_NAME VARCHAR2(30),
P_ROLE VARCHAR2(5)
ORGANIZATION EXTERNAL
(TYPE ORACLE_LOADER
DEFAULT DIRECTORY P_EXT_TAB_D
ACCESS PARAMETERS (
RECORDS DELIMITED by NEWLINE
SKIP 1
FIELDS TERMINATED BY "," OPTIONALLY ENCLOSED BY '"' LDRTRIM
REJECT ROWS WITH ALL NULL FIELDS
MISSING FIELD VALUES ARE NULL
DATE1 CHAR (10) Terminated by "," ,
DATE2 CHAR (10) Terminated by "," ,
POL_PRTY CHAR (30) Terminated by "," ,
P_NAME CHAR (30) Terminated by "," OPTIONALLY ENCLOSED BY '"' ,
P_ROLE CHAR (5) Terminated by ","
LOCATION ('Input.dat')
REJECT LIMIT UNLIMITED;
It created successfully using SQL Developer
Here is the issue.
It is not loading the records, where fields are enclosed in '"' (Rec # 2,3,4,7)
It is loading all NULL value record (Rec # 6)
*** If we remove the '"' from input data, it loads all records including all NULL records
Log file has
KUP-04021: field formatting error for field P_NAME
KUP-04036: second enclosing delimiter not found
KUP-04101: record 2 rejected in file ....
Our questions
Why did "REJECT ROWS WITH ALL NULL FIELDS" not working?
Why did Terminated by "," OPTIONALLY ENCLOSED BY '"' not working?
Any idea?
Thanks in helping.
Edited by: qwe16235 on Jun 11, 2011 11:31 AMI'm not sure, but maybe you should get rid of the redundancy that you have in your CREATE TABLE statement.
This line covers all fields:
FIELDS TERMINATED BY "," OPTIONALLY ENCLOSED BY '"'
{code}
So I would change the field list to:
{code}
DATE1 CHAR (10),
DATE2 CHAR (10),
POL_PRTY CHAR (30),
P_NAME CHAR (30),
P_ROLE CHAR (5)
{code}
It worked on my installation. -
Oracle 11g - External Table Issue?
Oracle 11g - External Table Issue?
=====================
I hope this is the right forum for this issue, if not let me, where to go.
We are using Oracle 11g (11.2.0.1.0) on (Platform : solaris[tm] oe (64-bit)), Sql Developer 3.0.04
We are trying to use oracle external table to load text files in .csv format. Here is our data look like.
======================
Date1,date2,Political party,Name, ROLE
20-Jan-66,22-Nov-69,Democratic,"John ", MMM
22-Nov-70,20-Jan-71,Democratic,"John Jr.",MMM
20-Jan-68,9-Aug-70,Republican,"Rick Ford Sr.", MMM
9-Aug-72,20-Jan-75,Republican,Henry,MMM
------ ALL NULL -- record
20-Jan-80,20-Jan-89,Democratic,"Donald Smith",MMM
======================
Our Expernal table structures is as follows
CREATE TABLE P_LOAD
DATE1 VARCHAR2(10),
DATE2 VARCHAR2(10),
POL_PRTY VARCHAR2(30),
P_NAME VARCHAR2(30),
P_ROLE VARCHAR2(5)
ORGANIZATION EXTERNAL
(TYPE ORACLE_LOADER
DEFAULT DIRECTORY P_EXT_TAB_D
ACCESS PARAMETERS (
RECORDS DELIMITED by NEWLINE
SKIP 1
FIELDS TERMINATED BY "," OPTIONALLY ENCLOSED BY '"' LDRTRIM
REJECT ROWS WITH ALL NULL FIELDS
MISSING FIELD VALUES ARE NULL
DATE1 CHAR (10) Terminated by "," ,
DATE2 CHAR (10) Terminated by "," ,
POL_PRTY CHAR (30) Terminated by "," ,
P_NAME CHAR (30) Terminated by "," OPTIONALLY ENCLOSED BY '"' ,
P_ROLE CHAR (5) Terminated by ","
LOCATION ('Input.dat')
REJECT LIMIT UNLIMITED;
It created successfully using SQL Developer
Here is the issue.
It is not loading the records, where fields are enclosed in '"' (Rec # 2,3,4,7)
It is loading all NULL value record (Rec # 6)
*** If we remove the '"' from input data, it loads all records including all NULL records
Log file has
KUP-04021: field formatting error for field P_NAME
KUP-04036: second enclosing delimiter not found
KUP-04101: record 2 rejected in file ....
Our questions
Why did "REJECT ROWS WITH ALL NULL FIELDS" not working?
Why did Terminated by "," OPTIONALLY ENCLOSED BY '"' not working?
Any idea?
Thanks in helping.
Edited by: qwe16235 on Jun 10, 2011 2:16 PMThe following worked for me:
drop table p_load;
CREATE TABLE P_LOAD
DATE1 VARCHAR2(10),
DATE2 VARCHAR2(10),
POL_PRTY VARCHAR2(30),
P_NAME VARCHAR2(30),
P_ROLE VARCHAR2(5)
ORGANIZATION EXTERNAL
(TYPE ORACLE_LOADER
DEFAULT DIRECTORY scott_def_dir1
ACCESS PARAMETERS (
RECORDS DELIMITED by NEWLINE
badfile scott_def_dir2:'p_load_%a_%p.bad'
logfile scott_def_dir2:'p_load_%a_%p.log'
SKIP 1
FIELDS TERMINATED BY "," OPTIONALLY ENCLOSED BY '"' LDRTRIM
MISSING FIELD VALUES ARE NULL
REJECT ROWS WITH ALL NULL FIELDS
DATE1 CHAR (10) Terminated by "," ,
DATE2 CHAR (10) Terminated by "," ,
POL_PRTY CHAR (30) Terminated by "," ,
P_NAME CHAR (30) Terminated by "," OPTIONALLY ENCLOSED BY '"' ,
P_ROLE CHAR (5) Terminated by ","
LOCATION ('Input.dat')
REJECT LIMIT UNLIMITED;
Note that I had to interchange the two lines:
MISSING FIELD VALUES ARE NULL
REJECT ROWS WITH ALL NULL FIELDS
Just to get the access parameters to parse correctly.
I added two empty lines, one in the middle and one at the end - both were rejected.
In the log file, you will see the rejectiions:
$ cat p_load_000_9219.log
LOG file opened at 07/08/11 19:47:23
Field Definitions for table P_LOAD
Record format DELIMITED BY NEWLINE
Data in file has same endianness as the platform
Reject rows with all null fields
Fields in Data Source:
DATE1 CHAR (10)
Terminated by ","
Enclosed by """ and """
Trim whitespace same as SQL Loader
DATE2 CHAR (10)
Terminated by ","
Enclosed by """ and """
Trim whitespace same as SQL Loader
POL_PRTY CHAR (30)
Terminated by ","
Enclosed by """ and """
Trim whitespace same as SQL Loader
P_NAME CHAR (30)
Terminated by ","
Enclosed by """ and """
Trim whitespace same as SQL Loader
P_ROLE CHAR (5)
Terminated by ","
Enclosed by """ and """
Trim whitespace same as SQL Loader
KUP-04073: record ignored because all referenced fields are null for a record
KUP-04073: record ignored because all referenced fields are null for a record
Input Data:
Date1,date2,Political party,Name, ROLE
20-Jan-66,22-Nov-69,Democratic,"John ", MMM
22-Nov-70,20-Jan-71,Democratic,"John Jr.",MMM
20-Jan-68,9-Aug-70,Republican,"Rick Ford Sr.", MMM
9-Aug-72,20-Jan-75,Republican,Henry,MMM
4-Aug-70,20-Jan-75,Independent
Result:
SQL> select * from p_load;
DATE1 DATE2 POL_PRTY P_NAME P_ROL
20-Jan-66 22-Nov-69 Democratic John MMM
22-Nov-70 20-Jan-71 Democratic John Jr. MMM
20-Jan-68 9-Aug-70 Republican Rick Ford Sr. MMM
9-Aug-72 20-Jan-75 Republican Henry MMM
Regards,
- Allen -
hi, experts,
I have run the utility to migrate 10g dashboard to 11g.
after the migration, I found that there is problem in a pivot table report,
the report contains 3 columns:
brand , subbrand, quantity
brand and subbrand are dimension
quantity is fact.
when brand and subbrand are placed in ROWS, quantity in MEASURES, Measure Labels in Columns, the pivot table gives correct result.
however, when brand is placed in ROWS, quantity in MEASURES, subbrand and Measure Labels in Columns,
the pivot table gives incorrect result,
some rows are duplicated.
how to solve?Hi,
Yes, we too faced this issue in 1.5 (seems a bug), but ultimately we had to make the application work for the column heading.
Use left and Right Indent accordingly to make the text appear to your requirement. We specified left indent 20 for our reports for making it centered, so you can try a value which will align for your requirement.
And thus meeting the requirement :)
Hope this answered.
Regards
MuRam
Edited by: MuRam on Jun 1, 2012 7:04 AM -
I've created a pivot table in which I have two columns listed in the Pivot Table Prompts area (formerly known as the pages area in 10g).
When editing the pivot table, the Layout section shows a summation icon beside the words Pivot Table Prompts. I've clicked that icon, and selected before.
The dropdown list for the first-listed (leftmost) column in the Pivot Table Prompts now shows an entry of All Values above the detail values, as it should.
However, the dropdown list for the other column does NOT have an All Values entry.
Furthermore, selecting the All Values entry for the first column HIDES the dropdown list for the second column entirely, and the pivot table shows a grand total of all values for the second column.
This makes no sense. I want to see All Values for my first column, and still be able to select individual values for my second column, or perhaps select an All Values for the second column.
There is zero documentation on this feature, as the OBIEE 11g User Guide does not contain the string Pivot Table Prompts.
Has this been reported as a bug?Well, I'll be darned. You are exactly right. 10g behaves exactly the same way when using two page dropdowns.
So yes, it was inherited from 10g. But then again, I inherited high blood pressure from my parents. That doesn't make it a desirable trait.
And there IS an obvious workaround: just create an ALL VALUES calculated member for each of those dimensions.
Thanks for the reply. Credit given for the correct answer. -
How to move excluded items into Measures in OBIEE 11g Pivot Table
Hi All,
Need your help. Previously I have about 25 facts in my pivot table as rows. Now I need to add about 10 more. Adding new criteria only put the items into Excluded section. How can I move all these new items at once to the end of the existing facts? What I can do now is moving them one by one, and in the middle of existing facts, then move it again, because I can point my cursor to the end of them directly.
Thanks a lot,
Gajah.I've tried to drag the fact heading, but I can't point my cursor to the end of existing list of facts (unfortunately they are all in the same fact group name). Do you have any suggestion on how to put the new facts at the end of the list?
Thanks. -
Oracle answers pivot table grand total problem
hi All,
I am working with OBI dashboard. I have a problem in creating a pivot table. To make it simple assume I have 3 columns: Sales, Target Sales, and %Diff. I added a total row but the problem is the total for %Diff is actually the average of the column instead of the %Diff between "total Sales" and Total "Target Sales". The aggregation rule for %Diff is set to Avg. and "Show data as" is set to Value.
I have seen the same problem here before in some forums.
Can anybody help me on this?
Thanks
Sanathe problem is the data is coming from Discoverer (another team converted data from disco. to OBI anwsers) so I do not have access to Biz model.
is there any other way for that?
thanks -
How to show "ALL" Values by default in Page Drop-Down Lists in Pivot Tables
Hi Everyone,
Iam stuck with 1 problem please can any 1 help me if u know the solution.
Here is my problem:
How to show "ALL" Values by default in Page Drop-Down Lists in Oracle BI Pivot Tables?
For example, if you place Region in the pages area, a Region drop-down list allows the user to select a particular region, and see the data for only that region, rather than seeing all the Regions,But by default its not showing "ALL" option in the drop down list ,rather than doing that its showing result for only 1 region by default.
And an other problem with this pages area is, if we palce the multiple attributes in the Pages area in the pivot table, the (Fields)result is showing in vertically, the attributes 1 by 1(Every attribute in a new line) ,rather than showing like that, is there any way to show the results in horizantally?(We want to have it as a seperate drop drown list for every field horizantally not as a concatenated list).Thanks Nikhil. But I am fetching the values from the LOVCache.java.
I am using <af:selectManyChoice>. Is there any way I can use LOVCache.java value for selecting default values instead of hard coding?
I mean to say can I write
unselectedLabel="#{LOVCache.entityTypeSelectionList.anyValue}"
where LOVCache.entityTypeSelectionList is used to populate the drop down box.
Regards,
Aseet -
More on the pivot table processing in coherence
hello, all:
I posted a question regarding how to create a pivot table in coherence (coherence and pivot table
Now I am on a project that my mgr wanted me to query a coherence cache and return a subset in "pivot" structure.
Suppose I send a request from the client with these info: String[] rows, String[] columns, String[] data. Each of them represent rows area, columns area and data area as in a Excel table. The aggregation is limited to sum for now.
I managed to create some code like this:
public Map<Object, Object> sum(Filter filter, String properties, String[] targets){
EntryAggregator[] entryAggregators = new EntryAggregator[targets.length];
for(int idex = 0;idex<targets.length;idex++){
entryAggregators[idex] = new DoubleSum(targets[idex]);
MultiExtractor me = new MultiExtractor(properties);
EntryAggregator ca = CompositeAggregator.createInstance(entryAggregators);
GroupAggregator ga = GroupAggregator.createInstance(me,ca);
return aggregate(filter, ga);
}here properties represent rows: "getX,getY,getZ" ; targets represent data to aggreated on: targets[] {"getA","getB"}
There are two relevant questions:
1. I am not able to put the columns info into the code;
2. the return type above is Map<Object, Object> , printing map looks like
+{[Parts, Appliance, Trash compactor],[214.5, 1.0]}...+
with 3 rows (X,Y,Z) in the first segment, and aggreated 2 values (A,B) in the 2nd segment.
how can I exact these values from a map structure (it seems the key/value are map themselves), and design a "pivot" structure to host them?
I hope I've made myself clear.
Thanks,
JohnnyHi Johnny,
Your question intrigued me so I thought I would do a bit of digging into how you might replicate a pivot table using aggregators. Well, it has taken me a few days and as it is quit a long subject I wrote it up on my blog rather than post it all in the forum http://thegridman.com/coherence/oracle-coherence-pivot-table-queries/
You were on the right track with the GroupAggregator but there is a bit more to do to allow all the different combinations of rows, columns and values as well as filtering.
I hope what I have written up is clear enough, just ask if you have more question.
JK -
OBIEE 11g - How to create clean looking pivot tables
Hi, does anyone have a good way to clean up the appearance of pivot tables in OBIEE 11g? I'm a big fan of Stephen Few and firmly believe in the "minimize non-data ink" theory. Unfortunately, there seems to be a lot of stuff on OBIEE pivots that I can't easily clean up. Does anyone have ideas for:
1. How to remove the "gray" / "beige" coloring from column and row dimension? I opened a ticket with Oracle 6 months ago, and basically they've just responded that it is a "enhancement request" for a future version (aka not going to see it for a LONG time)
2. For my "across" dimension, I don't seem to have a good way to show the dimension name. There is an option under "column properties" to "display heading" - but when this is turned on it scrunches the heading up directly over the column that has the down dimension members. I really want this to go across the pivot.
Any help on this would be greatly appreciated.
Thanks!
ScottHi,
Steps,
Just create DSN (odbc connection for the excel data source) then try to import via rpd that time u must need to select "System Tables"
For more steps,
http://allaboutobiee.blogspot.com/2012/03/excel-as-data-source-in-obiee.html
http://oraclebi.blog.com/working-with-excel-datasource-in-obiee
http://www.ascentt.com/2012/01/importing-excel-file-into-obiee-11g
http://obiee101.blogspot.com/2008/06/obiee-excel-import-prepping-data.html
Note: user id and password u can set it u r own and need to be updated in your connection pool alos else u can go with empty user id and password
Thanks
Deva -
Help on pivoting in oracle 11g
Hello,
I trying build a dynamic report with unlimited rows and columns. So I have 3 tables. The first table has report names mean while the second and the third tables have rows and columns information respectively.
-- table for report
reportid reportname
1 purchase
2 vendor
-- table for report rows
rowid rowname reportid
1 soap 1
2 shampoo 1
--table for report columns
colid colname reportid
1 liquid 1
2 kids 1
From those tables, I want to have a result like:
rowname liquid 1 kids 2
soap
shampoo
How do I obtain this kind of result using pivot in oracle 11g? If I can have, end users have to enter some values to the soap and liquid row, soap and kids rows,... Then I have to execute some query getting new values and column id.
Thank you.user12144220 wrote:
Hello,
I trying build a dynamic report with unlimited rows and columns. So I have 3 tables. The first table has report names mean while the second and the third tables have rows and columns information respectively.
-- table for report
reportid reportname
1 purchase
2 vendor
-- table for report rows
rowid rowname reportid
1 soap 1
2 shampoo 1
--table for report columns
colid colname reportid
1 liquid 1
2 kids 1
From those tables, I want to have a result like:
rowname liquid 1 kids 2
soap
shampoo
How do I obtain this kind of result using pivot in oracle 11g? If I can have, end users have to enter some values to the soap and liquid row, soap and kids rows,... Then I have to execute some query getting new values and column id.
Thank you.hows does actual report generation know, decide, or determine
from which table the actual columns are to be obtained?
some,many, most reports join two or more tables.
How does this design support joining tables required for reporting against more than 1 table?
some,many,most reports contain computed values like SUM(), COUNT(), etc.
Are you conceding that none of your reports will contain any of these values? -
XML Publisher Report Fails While using Pivot Table in R12 Oracle EBS
Hello All,
Need your help. I am trying to create a report with a Pivot table. I have created the .rtf file using the Oracle BI Publisher Template Builder for word 10.1.3.4.1. the data comes correctly in preview but when i register it in EBS and run the concurrent program it competes in warning and no output is displayed.
The error message looks like as follows.
[9/3/10 4:03:17 PM] [19934:RT444621] Executing post-processing actions for request 444621.
[9/3/10 4:03:17 PM] [19934:RT444621] Starting XML Publisher post-processing action.
[9/3/10 4:03:17 PM] [19934:RT444621]
Template code: XXECOHCGEN
Template app: XXECO
Language: en
Territory: 00
Output type: EXCEL
[9/3/10 4:03:31 PM] [19934:RT444621] Output file was found but is zero sized - Deleted
[9/3/10 4:03:31 PM] [UNEXPECTED] [19934:RT444621] java.lang.reflect.InvocationTargetException
at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:45)
at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:37)
at java.lang.reflect.Method.invoke(Method.java:599)
at oracle.apps.xdo.common.xml.XSLT10gR1.invokeNewXSLStylesheet(XSLT10gR1.java:611)
at oracle.apps.xdo.common.xml.XSLT10gR1.transform(XSLT10gR1.java:239)
at oracle.apps.xdo.common.xml.XSLTWrapper.transform(XSLTWrapper.java:182)
at oracle.apps.xdo.template.fo.util.FOUtility.generateFO(FOUtility.java:1044)
at oracle.apps.xdo.template.fo.util.FOUtility.generateFO(FOUtility.java:997)
at oracle.apps.xdo.template.fo.util.FOUtility.generateFO(FOUtility.java:212)
at oracle.apps.xdo.template.FOProcessor.createFO(FOProcessor.java:1665)
at oracle.apps.xdo.template.FOProcessor.generate(FOProcessor.java:975)
at oracle.apps.xdo.oa.schema.server.TemplateHelper.runProcessTemplate(TemplateHelper.java:5936)
at oracle.apps.xdo.oa.schema.server.TemplateHelper.processTemplate(TemplateHelper.java:3459)
at oracle.apps.xdo.oa.schema.server.TemplateHelper.processTemplate(TemplateHelper.java:3548)
at oracle.apps.fnd.cp.opp.XMLPublisherProcessor.process(XMLPublisherProcessor.java:302)
at oracle.apps.fnd.cp.opp.OPPRequestThread.run(OPPRequestThread.java:176)
Caused by: oracle.xdo.parser.v2.XPathException: Namespace prefix 'crosstab' used but not declared.
at oracle.xdo.parser.v2.XSLProcessor.reportException(XSLProcessor.java:806)
at oracle.xdo.parser.v2.XSLProcessor.newXSLStylesheet(XSLProcessor.java:571)
... 17 more
would appreciate some pointers to fix this issue.
Regards,
Abhijeet K
Edited by: Abhijeet K on Sep 3, 2010 8:10 AMHI, was there a Solution Ever found for this post other than the Workaround.
I am at the Same issue now, Any Valuable inputs will Help me finish my Report ASAP, becos currently this is my only Show stopper
we have Oracle Apps R12 realease 12.1.3 we use XMLpublisher built in R12
The issue i have is .
I created a XMLPublisher Report using PIVOT TABLE i would like to have my output to be in Excel, When i Preview it works fine, when i execute via Concurrent Program it gives the Following Log file
XXTPC Custom Application: Version : UNKNOWN
Copyright (c) 1979, 1999, Oracle Corporation. All rights reserved.
TPC_ITEM_COUNT_RPT module: TPC ITEM COUNT RPT
Current system time is 25-JUN-2012 11:00:39
XDO Data Engine Version No: 5.6.3
Resp: 21676
Org ID : 101
Request ID: 2149483
All Parameters: report_name=RUN BY ORDER TYPE:org_name=HQF:org_choice=TPC US:item_selection=1001:order_type=k-us:pstatus=entered,waved,notwaved,shipped:transit_days=:first_receipt_date=01-jun-2012:last_receipt_date=22-jun-2012
Data Template Code: TPC_ITEM_COUNT_RPT
Data Template Application Short Name: XXTPC
Debug Flag: N
{first_receipt_date=01-jun-2012, org_choice=TPC US, item_selection=1001, report_name=RUN BY ORDER TYPE, pstatus=entered,waved,notwaved,shipped, org_name=HQF, last_receipt_date=22-jun-2012, order_type=k-us, transit_days=}
Calling XDO Data Engine...
Start of log messages from FND_FILE
End of log messages from FND_FILE
Executing request completion options...
Output file size:
29148
------------- 1) PUBLISH -------------
Beginning post-processing of request 2149483 on node HQTERPAS1LX at 25-JUN-2012 11:00:51.
Post-processing of request 2149483 failed at 25-JUN-2012 11:00:52 with the error message:
One or more post-processing actions failed. Consult the OPP service log for details.
------------- 2) PRINT -------------
Not printing the output of this request because post-processing failed.
Finished executing request completion options.
Concurrent request completed
Current system time is 25-JUN-2012 11:00:52
I have requested my DBA to get me the OPP file..
Thanks in advance for any solution.
Maybe you are looking for
-
Itunes can't locate files after I listen to it on the Ipod
It seems that every time I listen to a song, I notice that Itunes can't locate it anymore. When I go to Itunes and look in my music folder, there is an exclamation point next to the song. When I click on it, the error message reads "cannot locate fil
-
Tried to install OSX on my macbook pro but install failed, now it won't restart
I Downloaded OSX onto my macbook pro and then I keep getting a message that installation failed. Now the machine is stuck in loop and won't go to my normal desktop screen.
-
hi all i'm writing an application to calculate all the days of all the week of the year i got 2 buttons, one to forward to the next week, the other to go back to the last this is my code: GregorianCalendar now = new GregorianCalendar(); DateFormat we
-
Uploading and Downloading files in an Applicaiton
I was able to successfully upload and download files stored in the database through Application Express by following the how to instructions at --> http://download-uk.oracle.com/docs/cd/B31036_01/doc/appdev.22/b28839/up_dn_files.htm#CJAHDJDA QUESTION
-
le disque dur FAT32 connecté à ma BBox Bouygues n'est plus visible de mon IMac depuis Mac OS X Lion. j'ai le message suivant systématiquement quand je clique sur l'icône BBox : La version du serveur auprès duquel vous essayez de vous connecter n'est