full outer join: how to get without null values?
full outer join: how to get without null values?Hello
Please go well this url
http://asktom.Oracle.com/pls/asktom/f?p=100:11:999478429860455:P11_QUESTION_ID:6585774577187
Thank you
Prakash P
Tags: Database
Similar Questions
-
What is the Assembly of 4 or 5 tables FULL OUTER JOIN logic?
the query is as below:
as you can see, I need FULL OUTER JOIN, these 5 tables and get a column from each table that is based on three common columns (ORG_iD, CUST_ID, CURRENT_DT).
And I wonder what is the logic of the 5 FULL OUTER JOIN table?
It will return if there is a folder that exists in the single table COL1? or table, COL2 and COL3 and so on. Basically any combination of these 5 tables.
Any ideas?SELECT (CASE WHEN COL1.ORG_ID IS NOT NULL THEN COL1.ORG_ID WHEN COL2.ORG_ID IS NOT NULL THEN COL2.ORG_ID WHEN COL3.ORG_ID IS NOT NULL THEN COL3.ORG_ID WHEN COL4.ORG_ID IS NOT NULL THEN COL4.ORG_ID ELSE COL5.ORG_ID END) ORG_ID, (CASE WHEN COL1.CUST_ID IS NOT NULL THEN COL1.CUST_ID WHEN COL2.CUST_ID IS NOT NULL THEN COL2.CUST_ID WHEN COL3.CUST_ID IS NOT NULL THEN COL3.CUST_ID WHEN COL4.CUST_ID IS NOT NULL THEN COL4.CUST_ID ELSE COL5.CUST_ID END) CUST_ID, (CASE WHEN COL1.CURRENT_DT IS NOT NULL THEN COL1.CURRENT_DT WHEN COL2.CURRENT_DT IS NOT NULL THEN COL2.CURRENT_DT WHEN COL3.CURRENT_DT IS NOT NULL THEN COL3.CURRENT_DT WHEN COL4.CURRENT_DT IS NOT NULL THEN COL4.CURRENT_DT ELSE COL5.CURRENT_DT END) CURRENT_DT, 'VENDORS' as ITEM_NAME, V_AGE_IND as ACCT_AGE_IND, COL1.AMT_ZSHT, COL2.AMT_YFYS, COL3.AMT_YFYS, COL4.AMT_YFYS, COL5.AMT_BZL, 'NAV', sysdate FROM COL1 FULL OUTER JOIN COL2 ON (COL1.ORG_ID=COL2.ORG_ID AND COL1.CURRENT_DT=COL2.CURRENT_DT AND COL1.CUST_ID=COL2.CUST_ID) FULL OUTER JOIN COL3 ON (COL2.ORG_ID=COL3.ORG_ID AND COL2.CURRENT_DT=COL3.CURRENT_DT AND COL2.CUST_ID=COL3.CUST_ID) FULL OUTER JOIN COL4 ON (COL3.ORG_ID=COL4.ORG_ID AND COL3.CURRENT_DT=COL4.CURRENT_DT AND COL3.CUST_ID=COL4.CUST_ID) FULL OUTER JOIN COL5 ON (COL4.ORG_ID=COL5.ORG_ID AND COL4.CURRENT_DT=COL5.CURRENT_DT AND COL4.CUST_ID=COL5.CUST_ID)
Thank youHello
When you perform a JOIN EXTERNAL COMPLETE multi - build that way, whenever you add a new table, you can just join the previous table because this table could be all NULL values for a given row. You can reach each new table to the first table, either, for the same reason. You must enclose each new table with all previous tables, like this:
FULL OUTER JOIN COL2 ON COL2.ORG_ID = COL1.ORG_ID AND COL2.CURRENT_DT = COL1.CURRENT_DT AND COL2.CUST_ID = COL1.CUST_ID FULL OUTER JOIN COL3 ON COL3.ORG_ID = COLAESCE (COL1.ORG_ID, COL2.ORG_ID) AND COL3.CURRENT_DT = COALESCE (COL1.CURRENT_DT, COL2.CURRENT_DT) AND COL3.CUST_ID = COALESCE (COL1.CUST_ID, COL2.CUST_ID) FULL OUTER JOIN COL3 ON COL4.ORG_ID = COLAESCE (COL1.ORG_ID, COL2.ORG_ID, COL3.ORG_ID) AND COL4.CURRENT_DT = COALESCE (COL1.CURRENT_DT, COL2.CURRENT_DT, COL3.CURRENT_DT) AND COL4.CUST_ID = COALESCE (COL1.CUST_ID, COL2.CUST_ID, COL3.CUST_ID) FULL OUTER JOIN COL3 ON COL5.ORG_ID = COLAESCE (COL1.ORG_ID, COL2.ORG_ID, COL3.ORG_ID, COL4.ORG_ID) AND COL5.CURRENT_DT = COALESCE (COL1.CURRENT_DT, COL2.CURRENT_DT, COL3.CURRENT_DT, COL4.CURRENT_DT) AND COL5.CUST_ID = COALESCE (COL1.CUST_ID, COL2.CUST_ID, COL3.CUST_ID, COL4.CUST_ID)
I hope that answers your question.
If not, post a small example data (CREATE TABLE and only relevant columns, INSERT statements), and the results you want from this data.
Explain how you get these results from these data.
Always tell what version of Oracle you are using. -
[8i] need help with full outer join combined with a cross join...
I can't understand how to combine a full outer join with a different type of join... is it possible?
Here are some create table and insert for examples of database:
And, the results that I want to get:CREATE TABLE my_tab1 ( record_id NUMBER NOT NULL , workstation VARCHAR2(4) , my_value NUMBER CONSTRAINT my_tab1_pk PRIMARY KEY (record_id) ); INSERT INTO my_tab1 VALUES(1,'ABCD',10); INSERT INTO my_tab1 VALUES(2,'ABCD',15); INSERT INTO my_tab1 VALUES(3,'ABCD',5); INSERT INTO my_tab1 VALUES(4,'A123',5); INSERT INTO my_tab1 VALUES(5,'A123',10); INSERT INTO my_tab1 VALUES(6,'A123',20); INSERT INTO my_tab1 VALUES(7,'????',5); CREATE TABLE my_tab2 ( workstation VARCHAR2(4) , wkstn_name VARCHAR2(20) CONSTRAINT my_tab2_pk PRIMARY KEY (workstation) ); INSERT INTO my_tab2 VALUES('ABCD','WKSTN 1'); INSERT INTO my_tab2 VALUES('A123','WKSTN 2'); INSERT INTO my_tab2 VALUES('B456','WKSTN 3'); CREATE TABLE my_tab3 ( my_nbr1 NUMBER , my_nbr2 NUMBER ); INSERT INTO my_tab3 VALUES(1,2); INSERT INTO my_tab3 VALUES(2,3); INSERT INTO my_tab3 VALUES(3,4);
I tried a number of different things, google my problem and no luck yet...workstation sum(my_value) wkstn_name my_nbr1 my_nbr2 --------------------------------------------------------------- ABCD 30 WKSTN 1 1 2 ABCD 30 WKSTN 1 2 3 ABCD 30 WKSTN 1 3 4 A123 35 WKSTN 2 1 2 A123 35 WKSTN 2 2 3 A123 35 WKSTN 2 3 4 B456 0 WKSTN 3 1 2 B456 0 WKSTN 3 2 3 B456 0 WKSTN 3 3 4 ???? 5 NULL 1 2 ???? 5 NULL 2 3 ???? 5 NULL 3 4
So, what I want, it's a full outer join of t1 and t2 on workstation and a cross join of one with the t3. I wonder if I can't find examples of it online because it is not possible...SELECT t1.workstation , SUM(t1.my_value) , t2.wkstn_name , t3.my_nbr1 , t3.my_nbr2 FROM my_tab1 t1 , my_tab2 t2 , my_tab3 t3 ...
Note: I'm stuck dealing with Oracle 8i
Thank you!!Hello
The query I posted yesterday is a little more complex that it should be.
My_tab2.workstation is unique, there is no reason to make a separate subquery as mt1. We can join my_tab1 to my_tab2 and get the SUM in a subquery.SELECT foj.workstation , foj.sum_my_value , foj.wkstn_name , mt3.my_nbr1 , mt3.my_nbr2 FROM ( -- Begin in-line view foj for full outer join SELECT mt1.workstation , SUM (mt1.my_value) AS sum_my_value , mt2.wkstn_name FROM my_tab1 mt1 , my_tab2 mt2 WHERE mt1.workstation = mt2.workstation (+) GROUP BY mt1.workstation , mt2.wkstn_name -- UNION ALL -- SELECT workstation , 0 AS sum_my_value , wkstn_name FROM my_tab2 WHERE workstation NOT IN ( -- Begin NOT IN sub-query SELECT workstation FROM my_tab1 WHERE workstation IS NOT NULL ) -- End NOT IN sub-query ) foj -- End in-line view foj for full outer join , my_tab3 mt3 ORDER BY foj.wkstn_name , foj.workstation , mt3.my_nbr1 , mt3.my_nbr2 ;
Thanks for posting the CREATE TABLE and INSERT statements, and very clear expected results!
user11033437 wrote:
... So, what I want, it's a full outer join of t1 and t2 on workstation and a cross join of one with the t3.She, exactly!
The trickiest part is when and how get SUM (my_value). You could address the question of exactly what my_tab3 must be attached to a cross that's exactly what should look like the result set of the full outer join between my_tab1 and my_tab2 to. To do this, take your desired results, remove columns that do not come from the outer join complete and delete duplicate rows. You will get:workstation sum(my_value) wkstn_name ----------- ------------- ---------- ABCD 30 WKSTN 1 A123 35 WKSTN 2 B456 0 WKSTN 3 ???? 5 NULL
So the heart of the problem is how to get these results of my_tab1 and my_tab2, which is done in the subquery FOJ above.
I tried to use auto-documenté in my code names. I hope you can understand.
I could spend hours explaining the different parts of this query more in detail, but I don't know that I would lose some of that time, explain things that you already understand. If you want an explanation of the specific element (s), let me know. -
Hi all
I need assistance with SQL FULL OUTER JOIN.
How to write with FULL OUTER JOIN, the query.
I tried like
I have 3 different queries.
Query q: SELECT emp_id LN.emp_id.
Sum (LN_amount) loan_amt
MY_LON_TAB LN
WHERE LN_amount > 20000
LN.emp_id GROUP;
Query b: SELECT PLN. EMP_ID emp_id,
Sum (PLAN_AMOUNT) plan_amt
FROM PLN MY_PLAN_TAB
where PLAN_AMOUNT <>0
GROUP BY PLN. EMP_ID;
Query C:
SELECT FLX. EMP_ID emp_id,
SUM (PRORATE_AMOUNT) PRORATE_AMT
OF MY_FLX_TAB FLX
WHERE PRORATE_AMOUNT <>0
FLX GROUP. EMP_ID;
Suppose that the different subquery above 3 a, b, c respectively. each subquery with emp_id and respective amount.
like a.emp_id, a.loan_amt
b.emp_id, b.plan_amt
c.emp_id, c.prorate_amt
I show all the empid with their amount respective.
schenario: If an account made, but not vice-versa b
and B have record, but not vice versa c
and a credit record but not vice versa c
first: I have external is associated with the A and B
Second: join external then complete the total outcome of (a & b) with c
but empid c just as empty.
My output is:
emp_id a.loan_amt, b.plan_amt c.prorate_amt
101 5000 null null
102 4500 null 2000
103 6700 null null
How to solve the foregoing to the ANSI (FULL OUTER JOIN) method.
Please suggest me.
Thanks in advance...
PKMHello
It is very difficult for anyone to say what you're doing wrong if they do not know what you are doing. Post your code FULL OUTER JOIN.
My best guess is:WITH a AS ( SELECT ... -- What you posted as query a ) , b AS ( SELECT ... -- What you posted as query b ) , c AS ( SELECT ... -- What you posted as query c ) SELECT COALESCE ( a.emp_id , b.emp_id , c.emp_id ) AS emp_id , ... -- whatever other columns you want FROM a FULL OUTER JOIN b ON b.emp_id = a.emp_id FULL OUTER JOIN c ON c.emp_id = COALESCE (a.emp_id, b.emp_id) ;
I hope that answers your question.
If not, post a small example (CREATE TABLE and INSERT statements) data for all tables and the results expected from these data (if not what you have already posted). -
HELP SQL (auto / full outer join with date corresponding)
I'm having a hard time get this query nailed... hoping someone can help me sorted.
create table tab1 (identification number,
date of eff_date,
Code1 varchar2 (2),
Code2 varchar2 (2)
)
/
insert into tab1 values (2, to_date('2015-01-14','YYYY-MM-DD'), 'DAT', 'AS');
insert into tab1 values (2, to_date('2015-03-19','YYYY-MM-DD'), 'DAT', 'AS');
insert into tab1 values (2, to_date('2015-08-28','YYYY-MM-DD'), 'DAT', 'AS');
insert into tab1 values (2, to_date('2015-11-12','YYYY-MM-DD'), 'DAT', 'AS');
insert into tab1 values (2, to_date('2015-01-03','YYYY-MM-DD'), "DAT", "AE");
insert into tab1 values (2, to_date('2015-03-14','YYYY-MM-DD'), "DAT", "AE");
insert into tab1 values (2, to_date('2015-04-18','YYYY-MM-DD'), "DAT", "AE");
insert into tab1 values (2, to_date('2015-09-14','YYYY-MM-DD'), "DAT", "AE");
insert into tab1 values (2, to_date('2015-01-14','YYYY-MM-DD'), "DAT", "BS");
insert into tab1 values (2, to_date('2015-02-14','YYYY-MM-DD'), "DAT", "BS");
insert into tab1 values (2, to_date('2015-03-14','YYYY-MM-DD'), "DAT", "BS");
insert into tab1 values (2, to_date('2015-05-14','YYYY-MM-DD'), 'DAT', 'BE');
insert into tab1 values (3, to_date('2015-09-16','YYYY-MM-DD'), 'DAT', 'AS');
insert into tab1 values (3, to_date('2015-04-16','YYYY-MM-DD'), "DAT", "AE");
tab1
ID, date, code 1, code2
2. DID DAT 2015-01-14
2. DID DAT 2015-03-19
2. DID DAT 2015-08-28
2. DID DAT 2015-11-12
2 AE DAT 2015-01-03
2 AE DAT 2015-03-14
2 AE DAT 2015-04-18
2 AE DAT 2015-09-14
2 BS DAT 2015-01-14
2 BS DAT 2015-02-14
2 BS DAT 2015-03-14
BE DAT 2 2015-05-14
3. DID DAT 2015-09-16
3 AE DAT 2015-04-16
What I need to do...
1 auto join to match EI for each partition ID
2. THAT the date must be less than or equal to the date of the AE and when there is more then a line corresponding to this criterion has chosen the date of closest EI of the date of the ACE.
3. it must be a full outer join because I want to show all lines, even if it is not a match. There is a beginning, but not record end end gold but no record of departure
4. If there is an AE line for many AS lines (the SA date is less then equals the date of EI) then join this AE line to all 3 rows of ACE
5. the same rules for BS and BE.
result should look like this.
ID, date, code 1, id_1 code2, date_1, code1_1, code2_1
2 2015-01-14 DAT AS 2 AE DAT 2015-03-14
2 2015-03-19 DAT AS 2 AE DAT 2015-04-18
2 2015-08-28 DAT AS 2 AE DAT 2015-09-14
2 2015-11-12 DAT DID ZERO ZERO ZERO ZERO
NO NO NO NO 2 AE DAT 2015-01-03
2015-01-2 14 DAT BS 2 BE DAT 2015-05-14
2015-02-2 14 DAT BS 2 BE DAT 2015-05-14
2015 03-2 14 DAT BS 2 BE DAT 2015-05-14
3 2015-09-16 DAT DID ZERO ZERO ZERO ZERO
NO NO NO NO 3 AE DAT 2015-04-16
My attempt was somewhat along these lines (dealing only with SA / combos AE) but it does not manage the many scenarios one (req 4).
Select a.*, b.* from
(select row_number () on the rn (partition by a.id order a.eff_date), a.*)
of tab1 where a.code2 = 'AS') a
full outer join
(select row_number () on the rn (b.eff_date order by b.id partition), b.*)
tab1 b where b.code2 = 'Æ') b
on a.id = b.id
and a.rn = b.rn
and a.eff_date < = b.eff_date
Hello
owbdev99 wrote:
I'm having a hard time get this query nailed... hoping someone can help me sorted.
create table tab1 (identification number,
date of eff_date,
Code1 varchar2 (2),
Code2 varchar2 (2)
)
/
insert into tab1 values (2, to_date('2015-01-14','YYYY-MM-DD'), 'DAT', 'AS');
...
Thanks for posting the CREATE TABLE and INSERT. I know it can be a lot of trouble. You want to get answers that work, not you? Make sure that the statements you post too much work. Test (and, if necessary, attach) your statements before committing. You said code1 be VARCHAR2, but all the instructions insertion have values of 3 characters for code1.
You are on the right track, with an analytical function, but ROW_NUMBER solves this problem. 1 "THAT line" could correspond to the 1st, 2nd, 3rd or any other line 'AE' and vice versa. Try to use the analytical MIN function instead or ROW_NUMBER, like this:
WITH got_next_e_date AS
(
SELECT id, eff_date, code1, code2
MIN (CASE
WHEN SUBSTR (code2, 2) = 'E '.
THEN eff_date
END
) OVER (PARTITION BY ID.
, SUBSTR (code2, 1, 1)
ORDER BY eff_date DESC
) AS next_e_date
OF tab1
)
s AS
(
SELECT *.
OF got_next_e_date
"WHERE SUBSTR (code2, 2) s ="
)
e
(
SELECT *.
OF got_next_e_date
WHERE SUBSTR (code2, 2) = 'E '.
)
SELECT s.id
s.eff_date
s.code1
s.code2
e.id AS id_1
e.eff_date AS eff_date_1
e.code1 AS code1_1
e.code2 AS code2_1
S
FULL OUTER JOIN e ON s.id = e.id
AND s.next_e_date = e.eff_date
AND SUBSTR (s.code2, 1, 1) = SUBSTR (e.code2, 1, 1)
ORDER OF NVL (s.id, e.id)
, NVL (SUBSTR (s.code2, 1, 1)
, SUBSTR (e.code2, 1, 1)
)
s.eff_date
;
Out (as you asked):
ID EFF_DATE CODE1, CODE2 ID_1 EFF_DATE_1 CODE1_1 CODE2_1
--- ---------- ----- ----- ----- ---------- ------- -------
2 2015-01-14 DAT AS 2 AE DAT 2015-03-14
2 2015-03-19 DAT AS 2 AE DAT 2015-04-18
2 2015-08-28 DAT AS 2 AE DAT 2015-09-14
2. DID DAT 2015-11-12
2 AE DAT 2015-01-03
2015-01-2 14 DAT BS 2 BE DAT 2015-05-14
2015-02-2 14 DAT BS 2 BE DAT 2015-05-14
2015 03-2 14 DAT BS 2 BE DAT 2015-05-14
3. DID DAT 2015-09-16
3 AE DAT 2015-04-16
I guess code2 is always 2 characters, and the 2nd character is always ' or 'E '.
I assume that the combination [id, eff_date, code2] is unique.
If these assumptions are wrong, you need a few minor changes, but nothing big.
-
Help required in a full outer join
In my view, the query below can be changed at the full outer join. But, I was not able to do.
I need your help to change to the full outer join. My current request isSELECT CLAIMNO,'1' INDX FROM D_CLAIM@CMS2PROD WHERE clntsys=76500 and facility=76501 and filecreatedt='18-feb-2011' and fileupdatedt is null MINUS SELECT CLAIMNO,'1' FROM D_CLAIM WHERE clntsys=76500 and facility=76501 and filecreatedt='18-feb-2011' and fileupdatedt is null UNION SELECT CLAIMNO,'2' FROM D_CLAIM WHERE clntsys=76500 and facility=76501 and filecreatedt='18-feb-2011' and fileupdatedt is null MINUS SELECT CLAIMNO,'2' FROM D_CLAIM@cms2prod WHERE clntsys=76500 and facility=76501 and filecreatedt='18-feb-2011' and fileupdatedt is null
Something like:
select nvl(p.claimno,s.claimno) claimno, nvl2(p.claimno,'PROD','STAGING') the_source, :the_clntsys clntsys, :the_facility facility from (select claimno from d_claim where clntsys = :the_clntsys and facility = :the_facility ) p full outer join (select claimno from d_claim@cms2prod /* never tried with remote */ where clntsys = :the_clntsys and facility = :the_facility ) s on p.claimno = s.claimno where p.claimno is null or s.claimno is null
Concerning
Etbin
-
Diff "full outer join" is going. "(+)" SELECT syntax?
As far as I know there are two ways to set an outer join:
Select... from tab1 external t1 full join tab2 t2 on t1.id = t2.id;
or:
SELECT... from tab1 tab2 t2, t1 where t1.id = t2.id (+)
They are absolutely equivialent?
Who are the most common one?
Who serve as well on other databases (DB2, MySQL)?
Can I put an additional WHERE clause at the end of the first statement:
SELECT... from tab1 t1 outer join t2 on t1.id = t2.id tab2 complete WHOSE...;Select... from tab1 external t1 full join tab2 t2 on t1.id = t2.id;
It's FULL OUTER JOIN
SELECT... from tab1 tab2 t2, t1 where t1.id = t2.id (+)
It's LEFT OUTER JOIN.
They are quite different.
FULL OUTER JOIN - retrieves all the rows from tab1 and tab2
LEFT OUTER JOIN - gets all the tab1 and lines than the line that matches the join condition of tab2.
Here is a simple test.
create table tab1(id integer) / create table tab2(id integer) / begin insert into tab1 values(1); insert into tab1 values(2); insert into tab1 values(3); end; / begin insert into tab2 values(3); insert into tab2 values(4); insert into tab2 values(5); end; / Select t1.id, t2.id from tab1 t1 full outer join tab2 t2 on t1.id =t2.id / Select t1.id, t2.id from tab1 t1, tab2 t2 where t1.id = t2.id(+) /
Run it and see the result.
-
30%
Hello
I have a few questions to ask. Please see below I have provided a script to recreate my problem.
Question 1.
I have the following query does not work when I include columns (see 1.2) in the select but will run when I use the Asterix symbol (see 1.1)
* 1.1 runs with no problems *.
* 1.2 returns error.*select * from ora full outer join txt on ora.ora_id_y = txt.txt_id_y;
Question 2.select txt.txt_id_y , txt.txt_n , txt.txt_y , ora.ora_n , ora.ora_y from ora full outer join txt on ora.ora_id_y = txt.txt_id_y; Error report: SQL Error: ORA-00918: column ambiguously defined 00918. 00000 - "column ambiguously defined" *Cause: *Action:
Is it possible to use a query with joins free and using multiple outer joins to accomplish what I have under which is seen 6 to access the query I have to Question 1.
CREATE THE SCRIPT
Published by: benton on August 21, 2012 10:48drop table master; create table master ( id varchar2 (10 char) , txt varchar2 (1 char) , ora varchar2 (1 char) ); INSERT INTO MASTER (ID, TXT, ORA) VALUES ('orange' , 'Y', 'Y'); INSERT INTO MASTER (ID, TXT, ORA) VALUES ('apple', 'Y', ''); INSERT INTO MASTER (ID, TXT, ORA) VALUES ('orange' , 'Y', 'N'); INSERT INTO MASTER (ID, TXT, ORA) VALUES ('peach' , 'Y', ''); create or replace force view ora_n as select id , count (ora) ORA_N from master where ora in ('N') group by id; create or replace force view ora_y as select id , count (ora) ORA_Y from master where ora in ('Y') group by id; create or replace force view txt_n as select id , count (txt) TXT_N from master where txt in ('N') group by id; create or replace force view txt_y as select id , count (txt) TXT_Y from master where txt in ('Y') group by id; create or replace force view ora as select ora_n.id ora_id_n , ora_y.id ora_id_y , ora_n.ora_n , ora_y.ora_y from ora_n full outer join ora_y on ora_n.id = ora_y.id; create or replace force view txt as select txt_y.id txt_id_n , txt_y.id txt_id_y , txt_n.txt_n , txt_y.txt_y from txt_n full outer join txt_y on txt_n.id = txt_y.id;
Published by: benton on August 21, 2012 11:11Found: support for Oracle, there are:
Bug 6319169 : ORA-918, FULL OUTER JOIN
Reproduced on 10.2.0.1,10.2.0.3.
Fixed to the product Version 11.0
WORKAROUND solution: alter session set '_column_elimination_off' = true; -
Hello
I have OBIEE 10.1.3.4.1 (Build 090414.1900)
I have a report in the oracle replies, but I need this report show all records include measures null.
in the OBIEE Administration model of business, I tried with right another join, left join outher, full of other join, but did not work.
Thank you.jmadrid21 wrote:
HelloI wrote wrong "outside" in the post, sorry.
In any case in the business model:
Rates (fact table)
dim_calendar
dim_operation
dim_account (this dimension I used right, left and full outer join)in my show report for example:
Now:
operating account amountInterbank 100 1000 4.5
200 324 5.5
500 2209 6.4
600 1089 9.9I need:
operating account amountInterbank 100 1000 4.5
200 324 5.5
300
400
500 2209 6.4
600 1089 9.9now, I read the links you send me.
Thank you
Published by: jmadrid21 on 27-sep-2012 07:13
Based on your example above, my links should help you solve your problem...
-
DVT:pivotFilterBar - how to get the selected values of the filter
Hi all
I have a question: how to get the selected values from the pivot table filter bar programmatically?
I tried to use
but to the edge of the side DATA INCORRECTESdeclarations page, it seems that it will return the cached values.pivotTable.getDataModel().getDataAccess().getValueQDR(startRow, startCol, DataAccess.QDR_WITH_PAGE);
Environment: JDev 11.1.1.3.0 without tasks.
Thank you
MiroslawHello
You can retrieve the value selected in the PivotFilterBar through the PivotFilterBar model, instead of dataaccess:
Download the template of the bar pivot filter instance
QueryDescriptior queryDescriptor = (QueryDescriptor) pivotFilterBar.getValue ();retrieve a list of criterion, each of them is used to fill each lov in the pivot filter bar
ConjunctionCriterion conjunctionCriterion = queryDescriptor.getConjunctionCriterion ();
ListcriterionList = conjunctionCriterion.getCriterionList ();
for (int i = 0; i)<_criterionList.size(); i++)="">
AttributeCriterion = (AttributeCriterion) criterionList.get (i) criterion._selected is the currently selected value
Selected object = criterion.getValues () .get (0);System.out.println (_selected);
}Hope that helps,
Chadwick -
How to get the RGB value of a pixel in a psd document using scripting Photoshop
Hi, guys! Does anyone know how to get the RGB value of a pixel in a psd document using scripts in Photoshop? I myself have missed for a long time and could not resolve. I am very happy to hear your voice as soon as possible!
Here is an example...
var originalUnits = app.preferences.rulerUnits; app.preferences.rulerUnits = Units.PIXELS; var doc = activeDocument; var Colour1 = GetHexColour(eyeDropperRGB(1,doc.height-1)); var Colour2 = GetHexColour(eyeDropperRGB(20,doc.height-5)); var Colour3 = GetHexColour(eyeDropperRGB(40,doc.height-14)); alert("Colour 1 = " +Colour1 + "\rColour 2 = " +Colour2 + "\rColour 3 = " +Colour3); var decColour = eyeDropperRGB(40,doc.height-14); alert("Red = " +decColour[0] + "\rGreen = " +decColour[1] + "\rBlue = " +decColour[2]); app.preferences.rulerUnits = originalUnits; function GetHexColour(reqHex){ var out=''; for(No in colours = reqHex){ out = out.concat(zeroPad(d2h(reqHex[No]),2)); } return out; }; function eyeDropperRGB(x,y) { var x2 = x + 1; var y2 = y + 1; var out = new Array(3); activeDocument.selection.select([[x,y], [x2,y], [x2,y2], [x, y2]], SelectionType.REPLACE, 0, false); for(ch in list = ["Red", "Green", "Blue"]) { histogram = activeDocument.channels[list[ch]].histogram; for (i = 0; i <= 255; i++) { if (histogram[i]) { out[ch] = i; break; } } } return out; }; function d2h(d) {return d.toString(16);} function zeroPad(n, s) { n = n.toString(); while (n.length < s) n = '0' + n; return n; };
-
How to get the return value from Java runtime.getRuntime.exec?
I am running shell from a (GR 11, 2) Oracle database commands on aix.
But, I would get a return value of a shell comand... as you get with "echo $?"
I use a code like
but I do not get a return value... because I don't know how to get the return value...CREATE OR REPLACE JAVA SOURCE NAMED common."Host" AS import java.io.*; public class Host { public static int executeCommand(String command) { int retval=0; try { String[] finalCommand; finalCommand = new String[3]; finalCommand[0] = "/bin/sh"; finalCommand[1] = "-c"; finalCommand[2] = command; final Process pr = Runtime.getRuntime().exec(finalCommand); pr.waitFor(); } catch (Exception ex) { System.out.println(ex.getLocalizedMessage()); retval=-1; } return retval; }; /
Published by: user9158455 on 22-Sep-2010 07:33Hello
Your pr.exitValue () has tried?
I think you also need a finally block that destroys the sub-process
Concerning
Peter -
How to get the decimal value of a string of international currency
Hi all
How to get the decimal values to a string of international currency.
Finally, we get to the real problem.
You can use location functions or write your own using string functions already mentioned...
http://developer.BlackBerry.com/native/documentation/Cascades/device_platform/internationalization/
-
How to convert the Null value to 0 after the outer join?
Hello guys
My requirement is in fact 2 of outer join tables (that's how), and I got the outer join works very well, so in my report, I have values null of measures in another table of facts as a result of the outer join...
Is there a way I can convert these nulls to 0?
I realized that the null value is not stored in the table, it is just following the outer join because the NULL do not match records in other... So by default, I'm expected to get NULL values...
Is there way to present these nulls to 0?
Thanks a lot for your adviceIn response, the syntax will be:
IFNULL (
, 0) try and let us know how you go.
See you soon
Alastair -
Outer join is not retrieve the correct values
Hi, I have a problem to recover some data from this query with outer join:
SELECT count (incident_id), range_2 of
(by selecting range_2 in apps.aaa_table),
(Select inc.incident_id,
XXN2B_RESOLUTION_RANGE (2, ROUND (((TO_DATE (inc. INCIDENT_ATTRIBUTE_7, «hh24:mi:ss jj/mm/yyyy»)-inc. INC_RESPONDED_BY_DATE) * 24), 2)) VARIES
Inc. stuff
Inc. INVENTORY_ITEM_ID,
prom_dt. Iptv_Sumptom - S? µpt? µA
OF cs_incidents_all_b inc.,.
cs_incidents_all_tl tl,
cs_sr_type_mapping m,
fnd_responsibility RESP,
ntt xxntt.xxntt_incidents_support,
xxntt.xxntt_incidents ntt_inc,
XXe.xxe_tt_promitheas_dt prom_dt,
20th. Xxe_Cs_Int_Sla als
WHERE inc.incident_id = tl.incident_id
AND tl. LANGUAGE = 'EL '.
AND inc.incident_type_id = m.incident_type_id
AND resp.responsibility_key IN (select SV. S fnd_flex_value_sets FLEX_VALUE, FND_FLEX_VALUES SV
where s.FLEX_VALUE_SET_NAME = 'XXNTT_RESPONSIBILITIES. '
AND S.FLEX_VALUE_SET_ID = SV. FLEX_VALUE_SET_ID)
AND m.responsibility_id = resp.responsibility_id
AND resp.end_date is null
AND inc.incident_number = ntt.incident_number (+)
AND inc.incident_number = ntt_inc.incident_number (+)
AND inc.incident_id = prom_dt.incident_id (+)
AND inc.incident_number = sla. Incident_Number (+)
- and don't like '%0:00% ' TOTAL_INACT_SLA_DURATION
(Inc. INC_RESPONDED_BY_DATE is not null AND INCIDENT_ATTRIBUTE_7 is not null)
) b.
(select * from xxntt_custom_hierarchy)
Union
Select eidos null null omada, null product_categiory, stuff, null, null, inv_item_descripiption, null, tautopoihsh, inv_item_id double null null symptom
) c
where a.range_2 = b.ranges (+)
and c.INV_ITEM_ID (+) = b.INVENTORY_ITEM_ID
and c.CATEGORY_ID (+) = b.CATEGORY_ID
and c.SYMPTOM (+) = b.IPTV_SUMPTOM
and c.OMADA = 'A '.
Range_2 group
This request is composed by 3 dataset: a, b and c
the data group is a fixed list of values (LOV): range_2 = "0-2h','2-4h','4-6h','6-8h','8-10h','10-12h','12-14h','14-16h','16-18h','18-20h".
the dataset b retrieve a list of the incident_id and their related ranges (calculated with the XXN2B_RESOLUTION_RANGE function)
the c dataset is just a filter on the b of dataset to retrieve only the incident_id who belong to the group "A".
I want to reach is this: always see the full list of values 'range_2', even if I do not have incident_id with a particular range.
That's why I put the condition: a.range_2 = b.ranges (+)
.. .but it does not work... I don't see the incident_id which have the scope inside the LOV... instead I want to see also if there is incident_id without a range to the LOV.
Range_2 grouping, I see:
! http://www.freeimagehosting.NET/uploads/d900035c11.jpg!
Instead of
! http://www.freeimagehosting.NET/uploads/99a75dfca4.jpg!
Can someone help me understand where is the error?
Thanks in advance
AlexHi Alex,
I think you need to externally join the final predicate, thus:
.. and c.OMADA(+) = 'A' ..
Concerning
Peter
Maybe you are looking for
-
Satellite M60-164, sticking the numeric keypad
Hello I wonder if anyone has experienced any sticky keys on the numeric keypad. I mean only to feel the resistance when you press the keys and they take the time to return to its normal position.No.... One looks like it might be food or drink has fal
-
Can we see it? Are they able to answer? I think that the mo forum is broken, or is not yet open, it's just a test
-
Whenever I have unplug my laptop, the message "your internal network card has been disabled to optimize battery life.". Lately, the message doesn't go away, even when I plug my laptop back in. When I move my cursor over the message, it is an icon of
-
Format of video MMS blackBerry Smartphones
Hey all. I have the BB 4.5.0.55 software on my Curve 8320 from Tmobile. I can record videos and watch them on my BB. However, when I send them to my wife who also has the same phone that she cannot open the videos. They are recorded as *.3gp files. W
-
rpet pilots are not digtally signed after installing drivers. HELP PLZ?