Expand and collapase column values of Pivot table in obiee 11g?
Hi experts,
I have Requirement.
*----------------------(+value1)---(+value2)----(-value3)---------(+value 4)
--------------------------------------------- x---y---z
**col1*-----col2----------------------------------------------------
----abc-------sys-------------------------------------1---3---9*
---xyz--------inc-------------------------------------7---8---77*
----xyz2------inc2------------------------------------7---8---32*
----xyz3------inc3------------------------------------5---08--13*
----xyz4------inc4------------------------------------6---0----72*
----xyz5------inc5------------------------------------4---2----3*
like that i want ...
any suggestions / help..
I hope you understand..
Thanks
Raam
Edited by: Tallapaneni on Jun 16, 2012 5:10 PM
i couldnt understand what you mean, can you please describe?
Similar Messages
-
Expand and Collpase nodes in ADF Pivot table
Hi,
I am looking for a code to Expand and Collapse all drilldown programmatically in adf pivot table.
I have only one level of drill down that display sub total.I have the same doubt. I need expand and collapse all nodes in ADF Pivot table. anybody Here?
-
How to hide % measure column Grand Total value in Pivot View in obiee 11g?
Hi ,
I am facing a issue in obiee 11g .I am using a Pivot table to display the grand total of 3 metric columns eg: A , B, C out of which B is percentage so I need to remove the grand total value of the percentage column. We have to stick to Pivot View only. Anyone can sugest me on this?
Thanks ,
ShrutiMove B to rows section or cast to char in Criteria tab by keeping the B in Measures section only.
cast(B as char) -
Measures as Rows in Pivot Table? OBIEE 11g
Hi,
Is it possible to show measures as rows and attributes as columns? I have only one value in my attribute columns.
example:
--------Company(Oracle)-----Country(India)
Sales 100 20000
Units 50 40000Thanks in advance.869650 wrote:
Hi,
Is it possible to show measures as rows and attributes as columns? I have only one value in my attribute columns.
example:
--------Company(Oracle)-----Country(India)
Sales 100 20000
Units 50 40000Thanks in advance.In the pivot table, you have a column for Rows, Columns, and Measures.
Try this:
Put the Measure Labels in the Rows section, the Company column in the Columns section, and your Measures in the Measures section. -
Sort on the Measure in Pivot table in OBIEE 11g
The pivot table ignores the sort on the measrure in the criteria section, so how can we enable sort on the measure columns in pivot in OBIEE 11g ?
887111 wrote:
The pivot table ignores the sort on the measrure in the criteria section, so how can we enable sort on the measure columns in pivot in OBIEE 11g ?Try this:
1) Make a duplicate layer of the measure column.
2) Move the duplicate layer to the far left in the Rows section.
3) Apply the desired sort order.
4) Hide the duplicate layer column. -
Resizing Column Width in Pivot Tables
Hi,
Can anyone help with adjusting the size of columns in a pivot table. I have 3 measure across 12 months on a page:
Total Volume Total Margin (%) Total Contribution
Market Jan 2010 Feb 2010 Mar 2010 Apr 2010 May 2010 Jun 2010 Jul 2010 Jan 2010 Feb 2010 Mar 2010 Apr 2010 May 2010 Jun 2010 Jul 2010 Jan 2010 Feb 2010 Mar 2010 Apr 2010 May 2010 Jun 2010 Jul 2010
The months on some measures are rolling up and the others are on one line, can the width of the column be wrapped or adjusted?
ThanksHi,
Yes,it can be.Click on a column and Go to Format Values>Additional Formatting Options>width.Try putting 50%,60% if you want them to expand.
Similiarly Format heading will work for heading size.
You have to play around with this to suit your requirements.
Thanks
Sandeep -
Hiding a measure column in a pivot table in BI Answers
Hi,
I need a report to have a hierachical format such as:
Top Company
Middle Company
Customer Name Customer Id Customer Creation Date
To achieve this, I apparently need to add a measure column to the Rows data, but I don't want to show it.
Would anyone know how I can hide a measure column in a pivot table?
Many thanks,
- JennyMeasure Columns can't be hidden like an attribute. How ever you can use custom style sheet for Value and Header Properties to not show the measure.
for the "Custom CSS Style Options (HTML Only)" under measure properties of the column set "Use Custom CSS Style" value to 'display:none'.
Let me know if this worked.
Regards,
Jay -
How to re-arrange the columns present in pivot table view in obiee 10?
Can you please tell me How to re-arrange the columns present in pivot table view in obiee 10?
I have columns as 1,2,3,4,6,7, in pivot table view.
I have calculated item (column 5 as summation of 1,2,3,4) and caluclated itme (column 9 as summation of 6,7)...now if i arrange ascending then calculated columns 5,9 don't get affected.
I need the order as 1,2,3,4,5,6,7,9 -
Nsert/Update and Add Column at the same Table and at the "same" Time
Hello,
I want Insert/Update and Add Column at the same Table and at the "same" Time but in different sessions.
Example:
At first the "insert/update" statement:
Insert into TestTable (Testid,Value) values (1,5105);
After that the "add" statement:
Alter table TestTable add TestColumn number;
- sadly now I get the message: ORA-00054: resource busy and acquire with NOWAIT specified
"insert/update" statement:
Insert into TestTable (Testid,Value) values (2,1135);
After that the execute commit.
I don't know when the first session set the commit statement so I want that the DB the "Alter Table..." statement execute if it's possible.
If it's possible I want to save a repeat loop with the "Alter Table..." statemtent.
Thanks for ideasWell I want to walk in the rain without and umbrella and still stay dry, but it ain't gonna happen.
You can't run a DDL statement against a table with transactions pending. Session 2 has to wait until session commits or rollbacks (or until the session is killed). That's just the way it is.
This makes sense if you think about it. The data dictionary has to be consistent across all sessions. If session 2 was allowed to change the table structure whilst session 1 has a pending transaction then the database is in an inconsistent state. This is easier to see if you consider the reverse situation - the ALTER TABLE statement run by session 2 does a DROP COLUMN TESTID rather than adding a column: now what should happen to session 1's INSERT statement? You have retrospectively invalidated a statement that was perfectly legal when it was executed.
If it's possible I want to save a repeat loop with the "Alter Table..." statemtent.Fnord.
Cheers, APC -
Oracle SP for comparing 80 column values across 8 table pairs in 2 diff DBs
Hi All,
I have an Oracle SP for comparing 80 column values across 8 table pairs in 2 diff DBs.
However, it is taking hell lot of time around 6hours to process 10,000 records.
Can anyone suggest how to fine-tune this?
Thanks guys.Tables prefixed with X are the temp tables to store data of DB-A.
The report will be originally based on DB-B, so DB Links will not be required for @PROD1.WORLD tables.
This is a test region, so I have pointed to @PROD1.WORLD to test with Prod Data.
SEC_COMPARE_CONFIG is the config table containing the table_name to be reported, corresponding temp tables to store the data and the columns on which it is to be reported.
There are in total 8 tables- 90 rows and 8 temp tables.
SPOKE_TO_HUB_SEC_MTCH_TBL records the securities on which it is to be reported.
HIST_DATA_COMPARE_TBL is the final results table.
Here is the entire code:
CREATE OR REPLACE PACKAGE SECURITY_COMPARE AS
PROCEDURE PROCESS_RECORDS (IN_EFFECTIVE_DATE IN DATE,
IN_PRIMARY_ASSET_ID IN VARCHAR2 DEFAULT NULL);
PROCEDURE IDENTIFY_SECURITIES ( P_EFFECTIVE_DATE IN DATE,
P_PRIMARY_ASSET_ID IN VARCHAR2 DEFAULT NULL);
PROCEDURE RETREIVE_RECORDS_FROM_SPOKE;
PROCEDURE COMPARE_RECORDS(p_err_msg OUT VARCHAR2);
PROCEDURE INSERT_DATA_TO_TABLE ( v_target_table VARCHAR2, v_sql_to_run VARCHAR2, v_commit_after NUMBER);
END SECURITY_COMPARE;
CREATE OR REPLACE PACKAGE BODY SECURITY_COMPARE AS
/*Declared String for recording Dynamic SQL's*/
LC_SQL VARCHAR2 (20000);
PROCEDURE PROCESS_RECORDS(IN_EFFECTIVE_DATE IN DATE,
IN_PRIMARY_ASSET_ID IN VARCHAR2 DEFAULT NULL)
AS
L_EFF_DATE DATE;
L_PRIMARY_ASSET_ID VARCHAR2(100);
k_err_msg VARCHAR2(100); --Error message displayed in case of NO discretionary records found.
BEGIN
L_EFF_DATE := IN_EFFECTIVE_DATE;
L_PRIMARY_ASSET_ID := IN_PRIMARY_ASSET_ID;
IDENTIFY_SECURITIES(L_EFF_DATE,L_PRIMARY_ASSET_ID); --Calling the Identify_Securities procedure to identify the securities older by 90 days from report effective date
RETREIVE_RECORDS_FROM_SPOKE(); --Retreiving the historic records from the security tables into temporary tables.
COMPARE_RECORDS(p_err_msg=>k_err_msg); --Compare the records and report the discrepencies into HIST_DATA_COMPARE_TBL table
END PROCESS_RECORDS;
PROCEDURE IDENTIFY_SECURITIES(P_EFFECTIVE_DATE IN DATE,
P_PRIMARY_ASSET_ID IN VARCHAR2 DEFAULT NULL)
AS
P_EFF_DATE DATE; --Effective Date of the report
P_PRIMARY_ID VARCHAR2(100); --Primary AssetID which is used to search based on specific security
v_target_table VARCHAR2(500); --Variable indicating the Target table for inserting the data
v_sql_to_run VARCHAR2(5000); --Variable to store the Dynamic SQL to be executed
v_commit_after NUMBER; --Variable to define after how many records is COMMIT to be done
BEGIN
LC_SQL :='';
P_EFF_DATE := P_EFFECTIVE_DATE;
P_PRIMARY_ID := P_PRIMARY_ASSET_ID;
/*Deleting Old Entries from SPOKE_TO_HUB_SEC_MTCH_TBL table*/
LC_SQL := 'TRUNCATE TABLE SPOKE_TO_HUB_SEC_MTCH_TBL';
EXECUTE IMMEDIATE LC_SQL;
IF(P_PRIMARY_ID is NULL) --In case records do not need to be identified on basis of specific security
THEN
/*Identify Securities older by 90days from report effective date*/
v_target_table := ' SPOKE_TO_HUB_SEC_MTCH_TBL';
v_sql_to_run := 'WITH T AS ('||
' SELECT R.PRIMARY_ASSET_ID PRIMARY_ASSET_ID_R,'||
' R.SECURITY_ALIAS SECURITY_ALIAS_R,'||
' R.LAST_HELD_DATE LAST_HELD_DATE_R,'||
' R.PREV_HELD_DATE PREV_HELD_DATE_R,'||
' Q.PRIMARY_ASSET_ID PRIMARY_ASSET_ID_Q,'||
' Q.SECURITY_ALIAS SECURITY_ALIAS_Q,'||
' COUNT(*) OVER(PARTITION BY Q.PRIMARY_ASSET_ID) CNT'||
' FROM [email protected] R,'||
' [email protected] Q'||
' WHERE SYS_OP_MAP_NONNULL(R.last_held_date) <> '||q'!'FF'!'||
' and ceil(R.last_held_date-to_date('||''''||P_EFF_DATE||''''||')) >= 0'||
' and ceil(R.last_held_date-to_date('||''''||P_EFF_DATE||''''||')) <= 60'||
' and R.PRIMARY_ASSET_ID=Q.PRIMARY_ASSET_ID'||
' )'||
' SELECT PRIMARY_ASSET_ID_R,'||
' SECURITY_ALIAS_R,'||
' LAST_HELD_DATE_R,'||
' PREV_HELD_DATE_R,'||
' PRIMARY_ASSET_ID_Q,'||
' SECURITY_ALIAS_Q'||
' FROM T'||
' WHERE CNT =1';
v_commit_after := 0;
INSERT_DATA_TO_TABLE(v_target_table,v_sql_to_run,v_commit_after);
ELSE
v_target_table := ' SPOKE_TO_HUB_SEC_MTCH_TBL';
v_sql_to_run := 'WITH T AS ('||
' SELECT R.PRIMARY_ASSET_ID PRIMARY_ASSET_ID_R,'||
' R.SECURITY_ALIAS SECURITY_ALIAS_R,'||
' R.LAST_HELD_DATE LAST_HELD_DATE_R,'||
' R.PREV_HELD_DATE PREV_HELD_DATE_R,'||
' Q.PRIMARY_ASSET_ID PRIMARY_ASSET_ID_Q,'||
' Q.SECURITY_ALIAS SECURITY_ALIAS_Q,'||
' COUNT(*) OVER(PARTITION BY Q.PRIMARY_ASSET_ID) CNT'||
' FROM [email protected] R,'||
' [email protected] Q'||
' where R.PRIMARY_ASSET_ID='||''''||P_PRIMARY_ID||''''||
' and R.PRIMARY_ASSET_ID=Q.PRIMARY_ASSET_ID'||
' )'||
' SELECT PRIMARY_ASSET_ID_R,'||
' SECURITY_ALIAS_R,'||
' LAST_HELD_DATE_R,'||
' PREV_HELD_DATE_R,'||
' PRIMARY_ASSET_ID_Q,'||
' SECURITY_ALIAS_Q'||
' FROM T'||
' WHERE CNT =1';
v_commit_after := 0;
INSERT_DATA_TO_TABLE(v_target_table,v_sql_to_run,v_commit_after);
END IF;
LC_SQL := 'TRUNCATE TABLE HIST_DATA_COMPARE_TBL';
EXECUTE IMMEDIATE LC_SQL;
END IDENTIFY_SECURITIES;
PROCEDURE RETREIVE_RECORDS_FROM_SPOKE
AS
v_target_table VARCHAR2(500);
v_sql_to_run VARCHAR2(5000);
v_commit_after NUMBER;
BEGIN
LC_SQL :='';
LC_SQL:= 'TRUNCATE TABLE X_SECMASTER_HISTORY_TBL';
EXECUTE IMMEDIATE LC_SQL;
LC_SQL:= 'TRUNCATE TABLE X_SEC_MASTER_DTL_HIST_TBL';
EXECUTE IMMEDIATE LC_SQL;
LC_SQL:= 'TRUNCATE TABLE X_SECMASTER_DTL_EXT_HST_TBL';
EXECUTE IMMEDIATE LC_SQL;
LC_SQL:= 'TRUNCATE TABLE X_EQUITY_HIST_TBL';
EXECUTE IMMEDIATE LC_SQL;
LC_SQL:= 'TRUNCATE TABLE X_EQUITY_DETAIL_HIST_TBL';
EXECUTE IMMEDIATE LC_SQL;
LC_SQL:= 'TRUNCATE TABLE X_FIXED_INCOME_HIST_TBL';
EXECUTE IMMEDIATE LC_SQL;
LC_SQL:= 'TRUNCATE TABLE X_FIXED_INCOME_DTL_EXT_TBL';
EXECUTE IMMEDIATE LC_SQL;
LC_SQL:= 'TRUNCATE TABLE X_DERIVATIVES_HIST_TBL';
EXECUTE IMMEDIATE LC_SQL;
/*SECMASTER_HISTORY*/
v_target_table := 'X_SECMASTER_HISTORY_TBL';
v_sql_to_run := ' SELECT /*+DRIVING_SITE(K)*/ K.* FROM [email protected] K '||
' INNER JOIN SPOKE_TO_HUB_SEC_MTCH_TBL I'||
' ON K.SECURITY_ALIAS = I.SPOKE_SEC'||
' AND K.SRC_INTFC_INST = 140 '||
' and K.EFFECTIVE_DATE =(SELECT /*+DRIVING_SITE(H)*/ MAX (H.EFFECTIVE_DATE) FROM [email protected] H WHERE'||
' H.SECURITY_ALIAS = K.SECURITY_ALIAS AND H.SRC_INTFC_INST = K.SRC_INTFC_INST)' ;
v_commit_after := 0;
INSERT_DATA_TO_TABLE(v_target_table,v_sql_to_run,v_commit_after);
/*SECURITY_MASTER_DETAIL_HIST*/
v_target_table := 'X_SEC_MASTER_DTL_HIST_TBL';
v_sql_to_run:= ' SELECT /*+DRIVING_SITE(K)*/ K.* FROM [email protected] K '||
' INNER JOIN SPOKE_TO_HUB_SEC_MTCH_TBL I'||
' ON K.SECURITY_ALIAS = I.SPOKE_SEC'||
' AND K.SRC_INTFC_INST = 140 '||
' and K.EFFECTIVE_DATE =(SELECT /*+DRIVING_SITE(H)*/ MAX (H.EFFECTIVE_DATE) FROM [email protected] H WHERE'||
' H.SECURITY_ALIAS = K.SECURITY_ALIAS AND H.SRC_INTFC_INST = K.SRC_INTFC_INST)' ;
v_commit_after := 0;
INSERT_DATA_TO_TABLE(v_target_table,v_sql_to_run,v_commit_after);
/*SECMASTER_DETAIL_EXT_HIST*/
v_target_table := 'X_SECMASTER_DTL_EXT_HST_TBL';
v_sql_to_run:= ' SELECT /*+DRIVING_SITE(K)*/ K.* FROM [email protected] K '||
' INNER JOIN SPOKE_TO_HUB_SEC_MTCH_TBL I'||
' ON K.SECURITY_ALIAS = I.SPOKE_SEC'||
' AND K.SRC_INTFC_INST = 140 '||
' and K.EFFECTIVE_DATE =(SELECT /*+DRIVING_SITE(H)*/ MAX (H.EFFECTIVE_DATE) FROM [email protected] H WHERE'||
' H.SECURITY_ALIAS = K.SECURITY_ALIAS AND H.SRC_INTFC_INST = K.SRC_INTFC_INST)' ;
v_commit_after := 0;
INSERT_DATA_TO_TABLE(v_target_table,v_sql_to_run,v_commit_after);
/*EQUITY_HIST*/
v_target_table := 'X_EQUITY_HIST_TBL';
v_sql_to_run:= ' SELECT /*+DRIVING_SITE(K)*/ K.* FROM [email protected] K '||
' INNER JOIN SPOKE_TO_HUB_SEC_MTCH_TBL I'||
' ON K.SECURITY_ALIAS = I.SPOKE_SEC'||
' AND K.SRC_INTFC_INST = 140 '||
' and K.EFFECTIVE_DATE =(SELECT /*+DRIVING_SITE(H)*/ MAX (H.EFFECTIVE_DATE) FROM [email protected] H WHERE'||
' H.SECURITY_ALIAS = K.SECURITY_ALIAS AND H.SRC_INTFC_INST = K.SRC_INTFC_INST)' ;
v_commit_after := 0;
INSERT_DATA_TO_TABLE(v_target_table,v_sql_to_run,v_commit_after);
/*EQUITY_DETAIL_HIST*/
v_target_table := 'X_EQUITY_DETAIL_HIST_TBL';
v_sql_to_run:= ' SELECT /*+DRIVING_SITE(K)*/ K.* FROM [email protected] K '||
' INNER JOIN SPOKE_TO_HUB_SEC_MTCH_TBL I'||
' ON K.SECURITY_ALIAS = I.SPOKE_SEC'||
' AND K.SRC_INTFC_INST = 140 '||
' and K.EFFECTIVE_DATE =(SELECT /*+DRIVING_SITE(H)*/ MAX (H.EFFECTIVE_DATE) FROM [email protected] H WHERE'||
' H.SECURITY_ALIAS = K.SECURITY_ALIAS AND H.SRC_INTFC_INST = K.SRC_INTFC_INST)' ;
v_commit_after := 0;
INSERT_DATA_TO_TABLE(v_target_table,v_sql_to_run,v_commit_after);
/*FIXED_INCOME_HIST*/
v_target_table := 'X_FIXED_INCOME_HIST_TBL';
v_sql_to_run:= ' SELECT /*+DRIVING_SITE(K)*/ K.* FROM [email protected] K '||
' INNER JOIN SPOKE_TO_HUB_SEC_MTCH_TBL I'||
' ON K.SECURITY_ALIAS = I.SPOKE_SEC'||
' AND K.SRC_INTFC_INST = 140 '||
' and K.EFFECTIVE_DATE =(SELECT /*+DRIVING_SITE(H)*/ MAX (H.EFFECTIVE_DATE) FROM [email protected] H WHERE'||
' H.SECURITY_ALIAS = K.SECURITY_ALIAS AND H.SRC_INTFC_INST = K.SRC_INTFC_INST)' ;
v_commit_after := 0;
INSERT_DATA_TO_TABLE(v_target_table,v_sql_to_run,v_commit_after);
/*FIXED_INCOME_DETAIL_EXT_HIST*/
v_target_table := 'X_FIXED_INCOME_DTL_EXT_TBL';
v_sql_to_run:= ' SELECT /*+DRIVING_SITE(K)*/ K.* FROM [email protected] K '||
' INNER JOIN SPOKE_TO_HUB_SEC_MTCH_TBL I'||
' ON K.SECURITY_ALIAS = I.SPOKE_SEC'||
' AND K.SRC_INTFC_INST = 140 '||
' and K.EFFECTIVE_DATE =(SELECT /*+DRIVING_SITE(H)*/ MAX (H.EFFECTIVE_DATE) FROM [email protected] H WHERE'||
' H.SECURITY_ALIAS = K.SECURITY_ALIAS AND H.SRC_INTFC_INST = K.SRC_INTFC_INST)' ;
v_commit_after := 0;
INSERT_DATA_TO_TABLE(v_target_table,v_sql_to_run,v_commit_after);
/*DERIVATIVES_HIST*/
v_target_table := 'X_DERIVATIVES_HIST_TBL';
v_sql_to_run:= ' SELECT /*+DRIVING_SITE(K)*/ K.* FROM [email protected] K '||
' INNER JOIN SPOKE_TO_HUB_SEC_MTCH_TBL I'||
' ON K.SECURITY_ALIAS = I.SPOKE_SEC'||
' AND K.SRC_INTFC_INST = 140 '||
' and K.EFFECTIVE_DATE =(SELECT /*+DRIVING_SITE(H)*/ MAX (H.EFFECTIVE_DATE) FROM [email protected] H WHERE'||
' H.SECURITY_ALIAS = K.SECURITY_ALIAS AND H.SRC_INTFC_INST = K.SRC_INTFC_INST)' ;
v_commit_after := 0;
INSERT_DATA_TO_TABLE(v_target_table,v_sql_to_run,v_commit_after);
END RETREIVE_RECORDS_FROM_SPOKE;
PROCEDURE COMPARE_RECORDS(p_err_msg OUT VARCHAR2)
AS
l_count NUMBER;
l_err_msg VARCHAR2(100);
TYPE T_SECURITIES is TABLE of HIST_DATA_COMPARE_TBL%rowtype;
ttype T_SECURITIES;
CURSOR C1
IS
SELECT TABLE_NAME, TEMP_TABLE, COLUMN_NAME from SEC_COMPARE_CONFIG
where column_name='EFFECTIVE_DATE';
CURSOR C2
IS
SELECT * FROM SEC_COMPARE_CONFIG where id <=82;
C_REC SEC_COMPARE_CONFIG%rowtype;
BEGIN
LC_SQL :='';
p_err_msg :='';
FOR C_REC in C1
loop
LC_SQL:= ' SELECT /*+DRIVING_SITE(B)*/ /*+PARALLEL(A,100)*/ B.SECURITY_ALIAS, to_char(C.SPOKE_PAID), A.SECURITY_ALIAS,to_char(C.HUB_PAID),'||''''||C_REC.TABLE_NAME||''''||','||q'!'EFFECTIVE_DATE'!'||','||
' NVL((cast(B.'||C_REC.COLUMN_NAME||' as VARCHAR2(100))),'||q'!'No Records Found'!'||'),'||
' NVL((cast(A.'||C_REC.COLUMN_NAME||' as VARCHAR2(100))),'||q'!'No Records Found'!'||')'||
' FROM '||C_REC.TEMP_TABLE||' A, SECURITYDBO.'||C_REC.TABLE_NAME ||'@PROD1.WORLD B,'||
' SPOKE_TO_HUB_SEC_MTCH_TBL C'||
' WHERE A.SRC_INTFC_INST=140'||
' AND B.SRC_INTFC_INST=140'||
' AND A.SECURITY_ALIAS=C.spoke_sec'||
' and b.security_alias=C.HUB_SEC'||
' AND a.effective_date <> (select max(h.effective_date) from SECURITYDBO.'||C_REC.TABLE_NAME||'@PROD1.WORLD H'||
' where h.security_alias=c.hub_sec and h.src_intfc_inst=140 )';
EXECUTE IMMEDIATE LC_SQL BULK COLLECT into ttype;
FORALL x in ttype.First..ttype.Last
insert into HIST_DATA_COMPARE_TBL values ttype(x);
commit;
end loop;
For C_REC in C2
loop
LC_SQL:= ' SELECT /*+DRIVING_SITE(B)*/ /*+PARALLEL(A,100)*/ B.SECURITY_ALIAS, to_char(C.SPOKE_PAID), A.SECURITY_ALIAS,to_char(C.HUB_PAID),'||''''||C_REC.TABLE_NAME||''''||','||''''||C_REC.COLUMN_NAME||''''||','||
' NVL((cast(B.'||C_REC.COLUMN_NAME||' as VARCHAR2(100))),'||q'!'No Records Found'!'||'),'||
' NVL((cast(A.'||C_REC.COLUMN_NAME||' as VARCHAR2(100))),'||q'!'No Records Found'!'||')'||
' FROM '||C_REC.TEMP_TABLE||' A, SECURITYDBO.'||C_REC.TABLE_NAME ||'@PROD1.WORLD B,'||
' SPOKE_TO_HUB_SEC_MTCH_TBL C'||
' WHERE A.SRC_INTFC_INST=140'||
' AND B.SRC_INTFC_INST=140'||
' AND A.SECURITY_ALIAS=C.spoke_sec'||
' and b.security_alias=C.HUB_SEC'||
' and b.effective_date=a.effective_date'||
' AND NVL((cast(A.'||C_REC.column_name||' as VARCHAR2(100))),'||q'!'No Records Found'!'||') <>'||
' NVL((cast(B.'||C_REC.column_name||' as VARCHAR2(100))),'||q'!'No Records Found'!'||')';
EXECUTE IMMEDIATE LC_SQL BULK COLLECT into ttype;
FORALL x in ttype.First..ttype.Last
insert into HIST_DATA_COMPARE_TBL values ttype(x);
commit;
end loop;
BEGIN
select count(*) into l_count from HIST_DATA_COMPARE_TBL;
if(l_count=0) then
l_err_msg :='No records found';
end if;
END;
END COMPARE_RECORDS;
NAME: INSERT_DATA_TO_TABLE
DESCRIPTION: This procedure will insert the records into the target table based based on the data fetched using the sql to run variable.
It also records the commit_after variable which defines that after how many records the insert needs to be committed.
PROCEDURE INSERT_DATA_TO_TABLE ( v_target_table VARCHAR2,
v_sql_to_run VARCHAR2,
v_commit_after NUMBER) IS
v_limit_sql1 VARCHAR2(300) := ' ';
v_limit_sql2 VARCHAR2(900) := ' ';
v_plsql_to_run VARCHAR2(32767);
BEGIN
IF NVL(v_commit_after,0) <> 0 THEN
v_limit_sql1:= ' LIMIT ' || TO_CHAR(v_commit_after) ;
v_limit_sql2:= ' IF MOD(v_number_of_rows, ' || TO_CHAR(v_commit_after) || ' ) = 0 THEN ' ||
' COMMIT; ' ||
' END IF; ' ;
END IF;
v_plsql_to_run:= ' ' ||
'DECLARE ' ||
' v_number_of_rows number:=0; ' ||
' ' ||
' TYPE MyType IS REF CURSOR; ' ||
' CV MyType; ' ||
' TYPE RecTyp IS TABLE OF ' || v_target_table || '%ROWTYPE; ' ||
' rec RecTyp; ' ||
' ' ||
'BEGIN ' ||
' ' ||
'OPEN CV FOR ' ||
' ' || REPLACE( v_sql_to_run, ';', ' ' ) || ' ; ' ||
' LOOP ' ||
' FETCH CV BULK COLLECT INTO rec ' || v_limit_sql1 || '; ' ||
' FORALL i IN 1..rec.COUNT ' ||
' INSERT /*+ APPEND */ INTO ' || v_target_table || ' VALUES rec(i); ' ||
' v_number_of_rows := v_number_of_rows + SQL%ROWCOUNT; ' ||
' ' || v_limit_sql2 || ' ' ||
' EXIT WHEN CV%NOTFOUND; ' ||
' ' ||
' END LOOP; ' ||
' COMMIT; ' ||
' CLOSE CV; ' ||
'END; ';
EXECUTE IMMEDIATE v_plsql_to_run;
COMMIT;
END INSERT_DATA_TO_TABLE;
END SECURITY_COMPARE; -
How do I make a header column in a pivot table a field from the table
I am trying to reference a field for a header column in a pivot table. for example: 2006 - Cat, 2006-Dog
I am trying to get the following result:
2006-Cat January February March April May June July August September October November December Totals
Euthanise 159 203 188 252 376 501 393 315 304 276 212 207 3386
Intake 192 220 234 305 412 538 409 330 329 305 244 241 3759
Redeem 10 4 4 3 5 3 2 1 2 1 2 5 42
Rescue 0 0 2 10 0 0 0 1 0 2 0 4 19
2006-Dog January February March April May June July August September October November December Totals
Euthanise 306 375 347 341 458 484 385 441 317 384 325 318 4481
Intake 455 514 495 465 571 595 486 570 438 511 434 473 6007
Redeem 65 63 57 34 57 43 58 46 58 67 53 59 660
Rescue 0 0 0 1 0 0 0 0 3 1 0 0 5
2007-Cat January February March April May June July August September October November December Totals
Euthanise 223 265 229 275 569 508 451 359 310 318 231 225 3963
Intake 268 286 274 315 594 567 488 397 329 344 279 249 4390
Redeem 11 7 11 1 5 2 0 2 4 3 16 2 64
Rescue 7 0 0 1 0 1 2 1 1 0 1 0 14
2007-Dog January February March April May June July August September October November December Totals
Euthanise 436 374 313 343 395 362 422 403 394 350 275 343 4410
Intake 594 510 480 477 508 520 553 502 509 544 410 480 6087
Redeem 67 72 77 57 47 51 50 40 41 62 45 45 654
Rescue 2 3 0 1 0 0 4 0 3 0 1 1 15
Any help is greatly appreciated.<?xml version="1.0" encoding="UTF-8" ?>
- <ROWSET>
- <ROW>
<header>2006 - CAT</header>
<MNTH>January</MNTH>
<imonth>1</imonth>
<cue>Euthanise</cue>
<anicnt>159.0</anicnt>
</ROW>
- <ROW>
<header>2006 - CAT</header>
<MNTH>January</MNTH>
<imonth>1</imonth>
<cue>Intake</cue>
<anicnt>192.0</anicnt>
</ROW>
- <ROW>
<header>2006 - CAT</header>
<MNTH>January</MNTH>
<imonth>1</imonth>
<cue>Redeem</cue>
<anicnt>10.0</anicnt>
</ROW>
- <ROW>
<header>2006 - CAT</header>
<MNTH>February</MNTH>
<imonth>2</imonth>
<cue>Euthanise</cue>
<anicnt>203.0</anicnt>
</ROW>
- <ROW>
<header>2006 - CAT</header>
<MNTH>February</MNTH>
<imonth>2</imonth>
<cue>Intake</cue>
<anicnt>220.0</anicnt>
</ROW>
- <ROW>
<header>2006 - CAT</header>
<MNTH>February</MNTH>
<imonth>2</imonth>
<cue>Redeem</cue>
<anicnt>4.0</anicnt>
</ROW>
- <ROW>
<header>2006 - CAT</header>
<MNTH>March</MNTH>
<imonth>3</imonth>
<cue>Euthanise</cue>
<anicnt>188.0</anicnt>
</ROW>
- <ROW>
<header>2006 - CAT</header>
<MNTH>March</MNTH>
<imonth>3</imonth>
<cue>Intake</cue>
<anicnt>234.0</anicnt>
</ROW>
- <ROW>
<header>2006 - CAT</header>
<MNTH>March</MNTH>
<imonth>3</imonth>
<cue>Redeem</cue>
<anicnt>4.0</anicnt>
</ROW>
- <ROW>
<header>2006 - CAT</header>
<MNTH>March</MNTH>
<imonth>3</imonth>
<cue>Rescue</cue>
<anicnt>2.0</anicnt>
</ROW>
- <ROW>
<header>2006 - CAT</header>
<MNTH>April</MNTH>
<imonth>4</imonth>
<cue>Euthanise</cue>
<anicnt>252.0</anicnt>
</ROW>
- <ROW>
<header>2006 - CAT</header>
<MNTH>April</MNTH>
<imonth>4</imonth>
<cue>Intake</cue>
<anicnt>305.0</anicnt>
</ROW>
- <ROW>
<header>2006 - CAT</header>
<MNTH>April</MNTH>
<imonth>4</imonth>
<cue>Redeem</cue>
<anicnt>3.0</anicnt>
</ROW>
- <ROW>
<header>2006 - CAT</header>
<MNTH>April</MNTH>
<imonth>4</imonth>
<cue>Rescue</cue>
<anicnt>10.0</anicnt>
</ROW>
- <ROW>
<header>2006 - CAT</header>
<MNTH>May</MNTH>
<imonth>5</imonth>
<cue>Euthanise</cue>
<anicnt>376.0</anicnt>
</ROW>
- <ROW>
<header>2006 - CAT</header>
<MNTH>May</MNTH>
<imonth>5</imonth>
<cue>Intake</cue>
<anicnt>412.0</anicnt>
</ROW>
- <ROW>
<header>2006 - CAT</header>
<MNTH>May</MNTH>
<imonth>5</imonth>
<cue>Redeem</cue>
<anicnt>5.0</anicnt>
</ROW>
- <ROW>
<header>2006 - CAT</header>
<MNTH>June</MNTH>
<imonth>6</imonth>
<cue>Euthanise</cue>
<anicnt>501.0</anicnt>
</ROW>
- <ROW>
<header>2006 - CAT</header>
<MNTH>June</MNTH>
<imonth>6</imonth>
<cue>Intake</cue>
<anicnt>538.0</anicnt>
</ROW>
- <ROW>
<header>2006 - CAT</header>
<MNTH>June</MNTH>
<imonth>6</imonth>
<cue>Redeem</cue>
<anicnt>3.0</anicnt>
</ROW>
- <ROW>
<header>2006 - CAT</header>
<MNTH>July</MNTH>
<imonth>7</imonth>
<cue>Euthanise</cue>
<anicnt>393.0</anicnt>
</ROW>
- <ROW>
<header>2006 - CAT</header>
<MNTH>July</MNTH>
<imonth>7</imonth>
<cue>Intake</cue>
<anicnt>409.0</anicnt>
</ROW>
- <ROW>
<header>2006 - CAT</header>
<MNTH>July</MNTH>
<imonth>7</imonth>
<cue>Redeem</cue>
<anicnt>2.0</anicnt>
</ROW>
- <ROW>
<header>2006 - CAT</header>
<MNTH>August</MNTH>
<imonth>8</imonth>
<cue>Euthanise</cue>
<anicnt>315.0</anicnt>
</ROW>
- <ROW>
<header>2006 - CAT</header>
<MNTH>August</MNTH>
<imonth>8</imonth>
<cue>Intake</cue>
<anicnt>330.0</anicnt>
</ROW>
- <ROW>
<header>2006 - CAT</header>
<MNTH>August</MNTH>
<imonth>8</imonth>
<cue>Redeem</cue>
<anicnt>1.0</anicnt>
</ROW>
- <ROW>
<header>2006 - CAT</header>
<MNTH>August</MNTH>
<imonth>8</imonth>
<cue>Rescue</cue>
<anicnt>1.0</anicnt>
</ROW>
- <ROW>
<header>2006 - CAT</header>
<MNTH>September</MNTH>
<imonth>9</imonth>
<cue>Euthanise</cue>
<anicnt>304.0</anicnt>
</ROW>
- <ROW>
<header>2006 - CAT</header>
<MNTH>September</MNTH>
<imonth>9</imonth>
<cue>Intake</cue>
<anicnt>329.0</anicnt>
</ROW>
- <ROW>
<header>2006 - CAT</header>
<MNTH>September</MNTH>
<imonth>9</imonth>
<cue>Redeem</cue>
<anicnt>2.0</anicnt>
</ROW>
- <ROW>
<header>2006 - CAT</header>
<MNTH>October</MNTH>
<imonth>10</imonth>
<cue>Euthanise</cue>
<anicnt>276.0</anicnt>
</ROW>
- <ROW>
<header>2006 - CAT</header>
<MNTH>October</MNTH>
<imonth>10</imonth>
<cue>Intake</cue>
<anicnt>305.0</anicnt>
</ROW>
- <ROW>
<header>2006 - CAT</header>
<MNTH>October</MNTH>
<imonth>10</imonth>
<cue>Redeem</cue>
<anicnt>1.0</anicnt>
</ROW>
- <ROW>
<header>2006 - CAT</header>
<MNTH>October</MNTH>
<imonth>10</imonth>
<cue>Rescue</cue>
<anicnt>2.0</anicnt>
</ROW>
- <ROW>
<header>2006 - CAT</header>
<MNTH>November</MNTH>
<imonth>11</imonth>
<cue>Euthanise</cue>
<anicnt>212.0</anicnt>
</ROW>
- <ROW>
<header>2006 - CAT</header>
<MNTH>November</MNTH>
<imonth>11</imonth>
<cue>Intake</cue>
<anicnt>244.0</anicnt>
</ROW>
- <ROW>
<header>2006 - CAT</header>
<MNTH>November</MNTH>
<imonth>11</imonth>
<cue>Redeem</cue>
<anicnt>2.0</anicnt>
</ROW>
- <ROW>
<header>2006 - CAT</header>
<MNTH>December</MNTH>
<imonth>12</imonth>
<cue>Euthanise</cue>
<anicnt>207.0</anicnt>
</ROW>
- <ROW>
<header>2006 - CAT</header>
<MNTH>December</MNTH>
<imonth>12</imonth>
<cue>Intake</cue>
<anicnt>241.0</anicnt>
</ROW>
- <ROW>
<header>2006 - CAT</header>
<MNTH>December</MNTH>
<imonth>12</imonth>
<cue>Redeem</cue>
<anicnt>5.0</anicnt>
</ROW>
- <ROW>
<header>2006 - CAT</header>
<MNTH>December</MNTH>
<imonth>12</imonth>
<cue>Rescue</cue>
<anicnt>4.0</anicnt>
</ROW>
- <ROW>
<header>2006 - DOG</header>
<MNTH>January</MNTH>
<imonth>1</imonth>
<cue>Euthanise</cue>
<anicnt>306.0</anicnt>
</ROW>
- <ROW>
<header>2006 - DOG</header>
<MNTH>January</MNTH>
<imonth>1</imonth>
<cue>Intake</cue>
<anicnt>455.0</anicnt>
</ROW>
- <ROW>
<header>2006 - DOG</header>
<MNTH>January</MNTH>
<imonth>1</imonth>
<cue>Redeem</cue>
<anicnt>65.0</anicnt>
</ROW>
- <ROW>
<header>2006 - DOG</header>
<MNTH>February</MNTH>
<imonth>2</imonth>
<cue>Euthanise</cue>
<anicnt>375.0</anicnt>
</ROW>
- <ROW>
<header>2006 - DOG</header>
<MNTH>February</MNTH>
<imonth>2</imonth>
<cue>Intake</cue>
<anicnt>514.0</anicnt>
</ROW>
- <ROW>
<header>2006 - DOG</header>
<MNTH>February</MNTH>
<imonth>2</imonth>
<cue>Redeem</cue>
<anicnt>63.0</anicnt>
</ROW>
- <ROW>
<header>2006 - DOG</header>
<MNTH>March</MNTH>
<imonth>3</imonth>
<cue>Euthanise</cue>
<anicnt>347.0</anicnt>
</ROW>
- <ROW>
<header>2006 - DOG</header>
<MNTH>March</MNTH>
<imonth>3</imonth>
<cue>Intake</cue>
<anicnt>495.0</anicnt>
</ROW>
- <ROW>
<header>2006 - DOG</header>
<MNTH>March</MNTH>
<imonth>3</imonth>
<cue>Redeem</cue>
<anicnt>57.0</anicnt>
</ROW>
- <ROW>
<header>2006 - DOG</header>
<MNTH>April</MNTH>
<imonth>4</imonth>
<cue>Euthanise</cue>
<anicnt>341.0</anicnt>
</ROW>
- <ROW>
<header>2006 - DOG</header>
<MNTH>April</MNTH>
<imonth>4</imonth>
<cue>Intake</cue>
<anicnt>465.0</anicnt>
</ROW>
- <ROW>
<header>2006 - DOG</header>
<MNTH>April</MNTH>
<imonth>4</imonth>
<cue>Redeem</cue>
<anicnt>34.0</anicnt>
</ROW>
- <ROW>
<header>2006 - DOG</header>
<MNTH>April</MNTH>
<imonth>4</imonth>
<cue>Rescue</cue>
<anicnt>1.0</anicnt>
</ROW>
- <ROW>
<header>2006 - DOG</header>
<MNTH>May</MNTH>
<imonth>5</imonth>
<cue>Euthanise</cue>
<anicnt>458.0</anicnt>
</ROW>
- <ROW>
<header>2006 - DOG</header>
<MNTH>May</MNTH>
<imonth>5</imonth>
<cue>Intake</cue>
<anicnt>571.0</anicnt>
</ROW>
- <ROW>
<header>2006 - DOG</header>
<MNTH>May</MNTH>
<imonth>5</imonth>
<cue>Redeem</cue>
<anicnt>57.0</anicnt>
</ROW>
- <ROW>
<header>2006 - DOG</header>
<MNTH>June</MNTH>
<imonth>6</imonth>
<cue>Euthanise</cue>
<anicnt>484.0</anicnt>
</ROW>
- <ROW>
<header>2006 - DOG</header>
<MNTH>June</MNTH>
<imonth>6</imonth>
<cue>Intake</cue>
<anicnt>595.0</anicnt>
</ROW>
- <ROW>
<header>2006 - DOG</header>
<MNTH>June</MNTH>
<imonth>6</imonth>
<cue>Redeem</cue>
<anicnt>43.0</anicnt>
</ROW>
- <ROW>
<header>2006 - DOG</header>
<MNTH>July</MNTH>
<imonth>7</imonth>
<cue>Euthanise</cue>
<anicnt>385.0</anicnt>
</ROW>
- <ROW>
<header>2006 - DOG</header>
<MNTH>July</MNTH>
<imonth>7</imonth>
<cue>Intake</cue>
<anicnt>486.0</anicnt>
</ROW>
- <ROW>
<header>2006 - DOG</header>
<MNTH>July</MNTH>
<imonth>7</imonth>
<cue>Redeem</cue>
<anicnt>58.0</anicnt>
</ROW>
- <ROW>
<header>2006 - DOG</header>
<MNTH>August</MNTH>
<imonth>8</imonth>
<cue>Euthanise</cue>
<anicnt>441.0</anicnt>
</ROW>
- <ROW>
<header>2006 - DOG</header>
<MNTH>August</MNTH>
<imonth>8</imonth>
<cue>Intake</cue>
<anicnt>570.0</anicnt>
</ROW>
- <ROW>
<header>2006 - DOG</header>
<MNTH>August</MNTH>
<imonth>8</imonth>
<cue>Redeem</cue>
<anicnt>46.0</anicnt>
</ROW>
- <ROW>
<header>2006 - DOG</header>
<MNTH>September</MNTH>
<imonth>9</imonth>
<cue>Euthanise</cue>
<anicnt>317.0</anicnt>
</ROW>
- <ROW>
<header>2006 - DOG</header>
<MNTH>September</MNTH>
<imonth>9</imonth>
<cue>Intake</cue>
<anicnt>438.0</anicnt>
</ROW>
- <ROW>
<header>2006 - DOG</header>
<MNTH>September</MNTH>
<imonth>9</imonth>
<cue>Redeem</cue>
<anicnt>58.0</anicnt>
</ROW>
- <ROW>
<header>2006 - DOG</header>
<MNTH>September</MNTH>
<imonth>9</imonth>
<cue>Rescue</cue>
<anicnt>3.0</anicnt>
</ROW>
- <ROW>
<header>2006 - DOG</header>
<MNTH>October</MNTH>
<imonth>10</imonth>
<cue>Euthanise</cue>
<anicnt>384.0</anicnt>
</ROW>
- <ROW>
<header>2006 - DOG</header>
<MNTH>October</MNTH>
<imonth>10</imonth>
<cue>Intake</cue>
<anicnt>511.0</anicnt>
</ROW>
- <ROW>
<header>2006 - DOG</header>
<MNTH>October</MNTH>
<imonth>10</imonth>
<cue>Redeem</cue>
<anicnt>67.0</anicnt>
</ROW>
- <ROW>
<header>2006 - DOG</header>
<MNTH>October</MNTH>
<imonth>10</imonth>
<cue>Rescue</cue>
<anicnt>1.0</anicnt>
</ROW>
- <ROW>
<header>2006 - DOG</header>
<MNTH>November</MNTH>
<imonth>11</imonth>
<cue>Euthanise</cue>
<anicnt>325.0</anicnt>
</ROW>
- <ROW>
<header>2006 - DOG</header>
<MNTH>November</MNTH>
<imonth>11</imonth>
<cue>Intake</cue>
<anicnt>434.0</anicnt>
</ROW>
- <ROW>
<header>2006 - DOG</header>
<MNTH>November</MNTH>
<imonth>11</imonth>
<cue>Redeem</cue>
<anicnt>53.0</anicnt>
</ROW>
- <ROW>
<header>2006 - DOG</header>
<MNTH>December</MNTH>
<imonth>12</imonth>
<cue>Euthanise</cue>
<anicnt>318.0</anicnt>
</ROW>
- <ROW>
<header>2006 - DOG</header>
<MNTH>December</MNTH>
<imonth>12</imonth>
<cue>Intake</cue>
<anicnt>473.0</anicnt>
</ROW>
- <ROW>
<header>2006 - DOG</header>
<MNTH>December</MNTH>
<imonth>12</imonth>
<cue>Redeem</cue>
<anicnt>59.0</anicnt>
</ROW>
- <ROW>
<header>2007 - CAT</header>
<MNTH>January</MNTH>
<imonth>1</imonth>
<cue>Euthanise</cue>
<anicnt>223.0</anicnt>
</ROW>
- <ROW>
<header>2007 - CAT</header>
<MNTH>January</MNTH>
<imonth>1</imonth>
<cue>Intake</cue>
<anicnt>268.0</anicnt>
</ROW>
- <ROW>
<header>2007 - CAT</header>
<MNTH>January</MNTH>
<imonth>1</imonth>
<cue>Redeem</cue>
<anicnt>11.0</anicnt>
</ROW>
- <ROW>
<header>2007 - CAT</header>
<MNTH>January</MNTH>
<imonth>1</imonth>
<cue>Rescue</cue>
<anicnt>7.0</anicnt>
</ROW>
- <ROW>
<header>2007 - CAT</header>
<MNTH>February</MNTH>
<imonth>2</imonth>
<cue>Euthanise</cue>
<anicnt>265.0</anicnt>
</ROW>
- <ROW>
<header>2007 - CAT</header>
<MNTH>February</MNTH>
<imonth>2</imonth>
<cue>Intake</cue>
<anicnt>286.0</anicnt>
</ROW>
- <ROW>
<header>2007 - CAT</header>
<MNTH>February</MNTH>
<imonth>2</imonth>
<cue>Redeem</cue>
<anicnt>7.0</anicnt>
</ROW>
- <ROW>
<header>2007 - CAT</header>
<MNTH>March</MNTH>
<imonth>3</imonth>
<cue>Euthanise</cue>
<anicnt>229.0</anicnt>
</ROW>
- <ROW>
<header>2007 - CAT</header>
<MNTH>March</MNTH>
<imonth>3</imonth>
<cue>Intake</cue>
<anicnt>274.0</anicnt>
</ROW>
- <ROW>
<header>2007 - CAT</header>
<MNTH>March</MNTH>
<imonth>3</imonth>
<cue>Redeem</cue>
<anicnt>11.0</anicnt>
</ROW>
- <ROW>
<header>2007 - CAT</header>
<MNTH>April</MNTH>
<imonth>4</imonth>
<cue>Euthanise</cue>
<anicnt>275.0</anicnt>
</ROW>
- <ROW>
<header>2007 - CAT</header>
<MNTH>April</MNTH>
<imonth>4</imonth>
<cue>Intake</cue>
<anicnt>315.0</anicnt>
</ROW>
- <ROW>
<header>2007 - CAT</header>
<MNTH>April</MNTH>
<imonth>4</imonth>
<cue>Redeem</cue>
<anicnt>1.0</anicnt>
</ROW>
- <ROW>
<header>2007 - CAT</header>
<MNTH>April</MNTH>
<imonth>4</imonth>
<cue>Rescue</cue>
<anicnt>1.0</anicnt>
</ROW>
- <ROW>
<header>2007 - CAT</header>
<MNTH>May</MNTH>
<imonth>5</imonth>
<cue>Euthanise</cue>
<anicnt>569.0</anicnt>
</ROW>
- <ROW>
<header>2007 - CAT</header>
<MNTH>May</MNTH>
<imonth>5</imonth>
<cue>Intake</cue>
<anicnt>594.0</anicnt>
</ROW>
- <ROW>
<header>2007 - CAT</header>
<MNTH>May</MNTH>
<imonth>5</imonth>
<cue>Redeem</cue>
<anicnt>5.0</anicnt>
</ROW>
- <ROW>
<header>2007 - CAT</header>
<MNTH>June</MNTH>
<imonth>6</imonth>
<cue>Euthanise</cue>
<anicnt>508.0</anicnt>
</ROW>
- <ROW>
<header>2007 - CAT</header>
<MNTH>June</MNTH>
<imonth>6</imonth>
<cue>Intake</cue>
<anicnt>567.0</anicnt>
</ROW>
- <ROW>
<header>2007 - CAT</header>
<MNTH>June</MNTH>
<imonth>6</imonth>
<cue>Redeem</cue>
<anicnt>2.0</anicnt>
</ROW>
- <ROW>
<header>2007 - CAT</header>
<MNTH>June</MNTH>
<imonth>6</imonth>
<cue>Rescue</cue>
<anicnt>1.0</anicnt>
</ROW>
- <ROW>
<header>2007 - CAT</header>
<MNTH>July</MNTH>
<imonth>7</imonth>
<cue>Euthanise</cue>
<anicnt>451.0</anicnt>
</ROW>
- <ROW>
<header>2007 - CAT</header>
<MNTH>July</MNTH>
<imonth>7</imonth>
<cue>Intake</cue>
<anicnt>488.0</anicnt>
</ROW>
- <ROW>
<header>2007 - CAT</header>
<MNTH>July</MNTH>
<imonth>7</imonth>
<cue>Rescue</cue>
<anicnt>2.0</anicnt>
</ROW>
- <ROW>
<header>2007 - CAT</header>
<MNTH>August</MNTH>
<imonth>8</imonth>
<cue>Euthanise</cue>
<anicnt>359.0</anicnt>
</ROW>
- <ROW>
<header>2007 - CAT</header>
<MNTH>August</MNTH>
<imonth>8</imonth>
<cue>Intake</cue>
<anicnt>397.0</anicnt>
</ROW>
- <ROW>
<header>2007 - CAT</header>
<MNTH>August</MNTH>
<imonth>8</imonth>
<cue>Redeem</cue>
<anicnt>2.0</anicnt>
</ROW>
- <ROW>
<header>2007 - CAT</header>
<MNTH>August</MNTH>
<imonth>8</imonth>
<cue>Rescue</cue>
<anicnt>1.0</anicnt>
</ROW>
- <ROW>
<header>2007 - CAT</header>
<MNTH>September</MNTH>
<imonth>9</imonth>
<cue>Euthanise</cue>
<anicnt>310.0</anicnt>
</ROW>
- <ROW>
<header>2007 - CAT</header>
<MNTH>September</MNTH>
<imonth>9</imonth>
<cue>Intake</cue>
<anicnt>329.0</anicnt>
</ROW>
- <ROW>
<header>2007 - CAT</header>
<MNTH>September</MNTH>
<imonth>9</imonth>
<cue>Redeem</cue>
<anicnt>4.0</anicnt>
</ROW>
- <ROW>
<header>2007 - CAT</header>
<MNTH>September</MNTH>
<imonth>9</imonth>
<cue>Rescue</cue>
<anicnt>1.0</anicnt>
</ROW>
- <ROW>
<header>2007 - CAT</header>
<MNTH>October</MNTH>
<imonth>10</imonth>
<cue>Euthanise</cue>
<anicnt>318.0</anicnt>
</ROW>
- <ROW>
<header>2007 - CAT</header>
<MNTH>October</MNTH>
<imonth>10</imonth>
<cue>Intake</cue>
<anicnt>344.0</anicnt>
</ROW>
- <ROW>
<header>2007 - CAT</header>
<MNTH>October</MNTH>
<imonth>10</imonth>
<cue>Redeem</cue>
<anicnt>3.0</anicnt>
</ROW>
- <ROW>
<header>2007 - CAT</header>
<MNTH>November</MNTH>
<imonth>11</imonth>
<cue>Euthanise</cue>
<anicnt>231.0</anicnt>
</ROW>
- <ROW>
<header>2007 - CAT</header>
<MNTH>November</MNTH>
<imonth>11</imonth>
<cue>Intake</cue>
<anicnt>279.0</anicnt>
</ROW>
- <ROW>
<header>2007 - CAT</header>
<MNTH>November</MNTH>
<imonth>11</imonth>
<cue>Redeem</cue>
<anicnt>16.0</anicnt>
</ROW>
- <ROW>
<header>2007 - CAT</header>
<MNTH>November</MNTH>
<imonth>11</imonth>
<cue>Rescue</cue>
<anicnt>1.0</anicnt>
</ROW>
- <ROW>
<header>2007 - CAT</header>
<MNTH>December</MNTH>
<imonth>12</imonth>
<cue>Euthanise</cue>
<anicnt>225.0</anicnt>
</ROW>
- <ROW>
<header>2007 - CAT</header>
<MNTH>December</MNTH>
<imonth>12</imonth>
<cue>Intake</cue>
<anicnt>249.0</anicnt>
</ROW>
- <ROW>
<header>2007 - CAT</header>
<MNTH>December</MNTH>
<imonth>12</imonth>
<cue>Redeem</cue>
<anicnt>2.0</anicnt>
</ROW>
- <ROW>
<header>2007 - DOG</header>
<MNTH>January</MNTH>
<imonth>1</imonth>
<cue>Euthanise</cue>
<anicnt>436.0</anicnt>
</ROW>
- <ROW>
<header>2007 - DOG</header>
<MNTH>January</MNTH>
<imonth>1</imonth>
<cue>Intake</cue>
<anicnt>594.0</anicnt>
</ROW>
- <ROW>
<header>2007 - DOG</header>
<MNTH>January</MNTH>
<imonth>1</imonth>
<cue>Redeem</cue>
<anicnt>67.0</anicnt>
</ROW>
- <ROW>
<header>2007 - DOG</header>
<MNTH>January</MNTH>
<imonth>1</imonth>
<cue>Rescue</cue>
<anicnt>2.0</anicnt>
</ROW>
- <ROW>
<header>2007 - DOG</header>
<MNTH>February</MNTH>
<imonth>2</imonth>
<cue>Euthanise</cue>
<anicnt>374.0</anicnt>
</ROW>
- <ROW>
<header>2007 - DOG</header>
<MNTH>February</MNTH>
<imonth>2</imonth>
<cue>Intake</cue>
<anicnt>510.0</anicnt>
</ROW>
- <ROW>
<header>2007 - DOG</header>
<MNTH>February</MNTH>
<imonth>2</imonth>
<cue>Redeem</cue>
<anicnt>72.0</anicnt>
</ROW>
- <ROW>
<header>2007 - DOG</header>
<MNTH>February</MNTH>
<imonth>2</imonth>
<cue>Rescue</cue>
<anicnt>3.0</anicnt>
</ROW>
- <ROW>
<header>2007 - DOG</header>
<MNTH>March</MNTH>
<imonth>3</imonth>
<cue>Euthanise</cue>
<anicnt>313.0</anicnt>
</ROW>
- <ROW>
<header>2007 - DOG</header>
<MNTH>March</MNTH>
<imonth>3</imonth>
<cue>Intake</cue>
<anicnt>480.0</anicnt>
</ROW>
- <ROW>
<header>2007 - DOG</header>
<MNTH>March</MNTH>
<imonth>3</imonth>
<cue>Redeem</cue>
<anicnt>77.0</anicnt>
</ROW>
- <ROW>
<header>2007 - DOG</header>
<MNTH>April</MNTH>
<imonth>4</imonth>
<cue>Euthanise</cue>
<anicnt>343.0</anicnt>
</ROW>
- <ROW>
<header>2007 - DOG</header>
<MNTH>April</MNTH>
<imonth>4</imonth>
<cue>Intake</cue>
<anicnt>477.0</anicnt>
</ROW>
- <ROW>
<header>2007 - DOG</header>
<MNTH>April</MNTH>
<imonth>4</imonth>
<cue>Redeem</cue>
<anicnt>57.0</anicnt>
</ROW>
- <ROW>
<header>2007 - DOG</header>
<MNTH>April</MNTH>
<imonth>4</imonth>
<cue>Rescue</cue>
<anicnt>1.0</anicnt>
</ROW>
- <ROW>
<header>2007 - DOG</header>
<MNTH>May</MNTH>
<imonth>5</imonth>
<cue>Euthanise</cue>
<anicnt>395.0</anicnt>
</ROW>
- <ROW>
<header>2007 - DOG</header>
<MNTH>May</MNTH>
<imonth>5</imonth>
<cue>Intake</cue>
<anicnt>508.0</anicnt>
</ROW>
- <ROW>
<header>2007 - DOG</header>
<MNTH>May</MNTH>
<imonth>5</imonth>
<cue>Redeem</cue>
<anicnt>47.0</anicnt>
</ROW>
- <ROW>
<header>2007 - DOG</header>
<MNTH>June</MNTH>
<imonth>6</imonth>
<cue>Euthanise</cue>
<anicnt>362.0</anicnt>
</ROW>
- <ROW>
<header>2007 - DOG</header>
<MNTH>June</MNTH>
<imonth>6</imonth>
<cue>Intake</cue>
<anicnt>520.0</anicnt>
</ROW>
- <ROW>
<header>2007 - DOG</header>
<MNTH>June</MNTH>
<imonth>6</imonth>
<cue>Redeem</cue>
<anicnt>51.0</anicnt>
</ROW>
- <ROW>
<header>2007 - DOG</header>
<MNTH>July</MNTH>
<imonth>7</imonth>
<cue>Euthanise</cue>
<anicnt>422.0</anicnt>
</ROW>
- <ROW>
<header>2007 - DOG</header>
<MNTH>July</MNTH>
<imonth>7</imonth>
<cue>Intake</cue>
<anicnt>553.0</anicnt>
</ROW>
- <ROW>
<header>2007 - DOG</header>
<MNTH>July</MNTH>
<imonth>7</imonth>
<cue>Redeem</cue>
<anicnt>50.0</anicnt>
</ROW>
- <ROW>
<header>2007 - DOG</header>
<MNTH>July</MNTH>
<imonth>7</imonth>
<cue>Rescue</cue>
<anicnt>4.0</anicnt>
</ROW>
- <ROW>
<header>2007 - DOG</header>
<MNTH>August</MNTH>
<imonth>8</imonth>
<cue>Euthanise</cue>
<anicnt>403.0</anicnt>
</ROW>
- <ROW>
<header>2007 - DOG</header>
<MNTH>August</MNTH>
<imonth>8</imonth>
<cue>Intake</cue>
<anicnt>502.0</anicnt>
</ROW>
- <ROW>
<header>2007 - DOG</header>
<MNTH>August</MNTH>
<imonth>8</imonth>
<cue>Redeem</cue>
<anicnt>40.0</anicnt>
</ROW>
- <ROW>
<header>2007 - DOG</header>
<MNTH>September</MNTH>
<imonth>9</imonth>
<cue>Euthanise</cue>
<anicnt>394.0</anicnt>
</ROW>
- <ROW>
<header>2007 - DOG</header>
<MNTH>September</MNTH>
<imonth>9</imonth>
<cue>Intake</cue>
<anicnt>509.0</anicnt>
</ROW>
- <ROW>
<header>2007 - DOG</header>
<MNTH>September</MNTH>
<imonth>9</imonth>
<cue>Redeem</cue>
<anicnt>41.0</anicnt>
</ROW>
- <ROW>
<header>2007 - DOG</header>
<MNTH>September</MNTH>
<imonth>9</imonth>
<cue>Rescue</cue>
<anicnt>3.0</anicnt>
</ROW>
- <ROW>
<header>2007 - DOG</header>
<MNTH>October</MNTH>
<imonth>10</imonth>
<cue>Euthanise</cue>
<anicnt>350.0</anicnt>
</ROW>
- <ROW>
<header>2007 - DOG</header>
<MNTH>October</MNTH>
<imonth>10</imonth>
<cue>Intake</cue>
<anicnt>544.0</anicnt>
</ROW>
- <ROW>
<header>2007 - DOG</header>
<MNTH>October</MNTH>
<imonth>10</imonth>
<cue>Redeem</cue>
<anicnt>62.0</anicnt>
</ROW>
- <ROW>
<header>2007 - DOG</header>
<MNTH>November</MNTH>
<imonth>11</imonth>
<cue>Euthanise</cue>
<anicnt>275.0</anicnt>
</ROW>
- <ROW>
<header>2007 - DOG</header>
<MNTH>November</MNTH>
<imonth>11</imonth>
<cue>Intake</cue>
<anicnt>410.0</anicnt>
</ROW>
- <ROW>
<header>2007 - DOG</header>
<MNTH>November</MNTH>
<imonth>11</imonth>
<cue>Redeem</cue>
<anicnt>45.0</anicnt>
</ROW>
- <ROW>
<header>2007 - DOG</header>
<MNTH>November</MNTH>
<imonth>11</imonth>
<cue>Rescue</cue>
<anicnt>1.0</anicnt>
</ROW>
- <ROW>
<header>2007 - DOG</header>
<MNTH>December</MNTH>
<imonth>12</imonth>
<cue>Euthanise</cue>
<anicnt>343.0</anicnt>
</ROW>
- <ROW>
<header>2007 - DOG</header>
<MNTH>December</MNTH>
<imonth>12</imonth>
<cue>Intake</cue>
<anicnt>480.0</anicnt>
</ROW>
- <ROW>
<header>2007 - DOG</header>
<MNTH>December</MNTH>
<imonth>12</imonth>
<cue>Redeem</cue>
<anicnt>45.0</anicnt>
</ROW>
- <ROW>
<header>2007 - DOG</header>
<MNTH>December</MNTH>
<imonth>12</imonth>
<cue>Rescue</cue>
<anicnt>1.0</anicnt>
</ROW>
</ROWSET> -
How do I get and set column attributes in a table or a treetable with Java?
Using 11.1.1.4.0
Hi,
How do I get and set column attributes in a table or a treetable with Java? For a simple example, say I have a table and want certain roles to see all columns (including address), and other roles can see only certain columns (no address). In a Java method, I want to test if a table's column visible attribute is true and if so, set it to false before rendering it.
Thanks in advance,
TroyHi,
this use case would be a perfect example for using seeded MDS customization. Instead of checking what users are allowed to see or not upon rendering time, you have a customization class and thus the framework doing this for you.
http://www.oracle.com/technetwork/developer-tools/adf/learnmore/31-mds-sample-169173.pdf
In this paper and sample, specific users see different layouts. It also contains a customization class that shows how this can leverage ADF Security
Frank -
Scroll Bar for Pivot table in OBIEE reporting Tool
Hi,
Please let me know how to add scroll bar for a pivot table in OBIEE reporting Tool
Thanks,
Usha.
Edited by: Usha.Cholangi on Aug 10, 2011 10:17 PMHi Usha,
Not sure about directly implementing scroll bars in a pivot table in OBIEE.
But you can try using an IFrame which would display this report (pivot table) inside it. If the report increases in size (defined size of IFrame), it would automatically add scrollbars to the view.
Let me know if you need more info on these lines.
Thanks -
Multiple Hierarchies from Single Dimension Table in OBIEE-11g?
Is it possible to have Multiple Hierarchies from Single Dimension Table in OBIEE-11g?
Like 1)Year-Qtr-Month-Weeks 2)Year-Month-DaysHi,
or if your lowest level is the same like
Day->month->year->Total
Day->businessMonth->businessyear->Total
Then yes, it is.
Create the first, then you start to create the second by adding your top(business year) level on the same level as the one you have (year) both under your total.
Then when you would add your second base level, there is a special option for it, something like use other hierarchy level/shared level (sorry can't recall and does not have a connection right now) then you select your existing day level under your businessmonth level.
Hope this helps,
Regards,
D -
Dynamic Column Names from one table and its corresponding values from another table
I have 2 tables. First tables gives the specification if a column is required or not. we have the 2nd table with the same column name where we provide the actual values.
I want to select all the required columns from the 1st table and retrieve the values for those from the 2nd table. Both this i want to achieve in a single select statement.This wil require a dynamic Query with a Pivot
DECLARE @ColsPivot as VARCHAR(MAX);
DECLARE @Query AS VARCHAR(MAX);
1. Retreive the ID for all required field
SET @ColsPivot = (SELECT STUFF((SELECT ',' + quotename(CAST([RequirementID] as varchar(3))) FROM [dbo].[Requirement] WHERE required=1 FOR XML PATH(''), TYPE).value('.', 'NVARCHAR(MAX)') ,1,1,''));
This will give you : [1],[2],[3],[8],[9],[14] for exemple.
2. Build your Query
SET @Query ='SELECT ClientID,'+@ColsPivot+''
FROM (
SELECT [ClientID],[RequirementID],[Value]
FROM dbo.RequirementValue
WHERE ClientID=@CliendID --Optional SP parameter
)src
PIVOT(
MAX(Value)
for [RequirementID] in ('+@ColsPivot+')
) p';
3. Exec(@Query);
Maybe you are looking for
-
Hi Microsoft Excel Power Map program team! I looked @ your Excel Power Map program add on, and it's great. However everyone is looking for the ability for the user to create polygon (boundary) maps. It should not be that hard to add this functionalit
-
ITUNES OPENS AND THEN ERROR MESSAGE COMES UP SAYING ITUNES HAS STOPPED WORKING AND THE PREBLEM EVENT NAME SAYS APPCRASH WITH A LOAD OF OTHR INFO UPDATED QUICKTIME BUT ITS STILL THE SAME, CANT UPGRADE ANY NEW VERSIONS AS IT WONT LET ME GET THAT FAR A
-
Android: Textfield-Cursor movement not working in Portrait
Hi, I just deployed a new build of my Android apps with Air 16.0.0.272 and I noticed that while Portrait mode, I am unable to move the cursor in an Input Textfield with text by tapping at the location. Instead the cursor will pop up before the first
-
Can I compress my songs in itunes - currently my 1600 songs are taking up 14 GB of room - I was told that the nano 8 GB could hold up to 2000 songs - is there a reason that my 1600 are taking up so much space. Someone suggested removing the album co
-
Hi mac people, I need to share a USB2 external HD with PCs, but when connected to the mac (usb2 port) it W/R at 1,25 mb/sec at top speed. I'm wondering why. It's formatted NTFS. Any clues ? Thanks Paolo