Query two tables of facts which is non-compliant dimension
I have two fact tables and I have this implementation to the RPD:Fact1 joined DimA and Edin
Fact2 joined DimA
On the front-end, I build two analyses:
Analysis 1:
DimA.A, Fact1.1, Fact2.2
Analysis 2:
DimA.A, DimB.B, Fact1.1, Fact2.2
In the results of the analysis 1, I see valid values for Fact2.2
In the results of the analysis 2, I see Fact2.2 vacuum of the column. I think the reason is that Fact2 is not joined to the EDIN.
Is it possible that I should be able to report against the two columns of the dimension tables (DIMA and EDIN) to FACT1 and FACT2 measures... Even if I did not join between EDIN and FACT2.
Any answer would be useful!
Kind regards
Annu
Hello
Go to the LTS level - content of the fact that not having the join with the Dimension and put on a Total of this Dimension and level total Column (Measure also) (Double click - levels) (Dim hierarchy assume is already configured)
Shoot everything (D1, D2, F1, F2) you will see results.
Update Me
Thank you
NK
Published by: DNK on March 20, 2013 13:35
Tags: Business Intelligence
Similar Questions
-
Two Tables of FACTS, some common Dimensions and common
Hello to all, question, I'm sure you have met in the past, but always wanted to get your opinion.
I have a few FACT tables and dimensions that are shared (common size). Rest of the dimensions are related to one or the other FACT tables.
What is the best way to present a view where users CAN pull information from both tables?
I managed by pulling the shared dimensions (common) on the tables of BOTH FACTS and having the same grain, but this view breaks down when I pull information from a Dimension that does not much to do with another.
What is the best way to present it? Should it be broken down in three areas?
Business line 1-> some Dims-> FACT Table has
Area 2-> some Dims-> Table of FACTS B
AND
Business line 3-> * only commune Dims *-> Table of FACTS A & B Table of FACTS?
Your comments are always appreciated.
Kind regards
Published by: user10679130 on October 12, 2009 15:27Start by checking the forum for similar discussions/questions.
Join two tables of facts different dimensions in the single logical table
http://108obiee.blogspot.com/2009/08/joining-two-fact-tables-with-different.htmlThis solution maintains two tables of facts in the same area in the logical table is unique, with municipalities and non-common dimensions.
Concerning
Goran
http://108obiee.blogspot.com -
Problem: two tables of facts and a dimension in accordance with
Hello world!
I need solve this situation:
I have two fact tables, say F1 and F2, which are both linked to D1, my dimension in line
I just need to select fields of D1, but I know that, when querying, OBIEE links to a table of facts anyway... How is it chooses the fact table? In other words, if I want to only fields D1, not the system also queries of F1 or F2? What is a random choice?
Is there a way to "force" this choice, saying the system for example to choose only from F1?
Is there a work around to resolve this situation? Remember, I only need fields D1.
Thank you!!The solution to your problem is "column name".
Go to the layer of presentation and double click on your domain. Then you will see name column option. Click on set. give the corresponding column actually it (in your column of fact give deal F1)References: http://oracle-bi.siebelunleashed.com/articles/implicit-fact-column/
Thank you
GSRPublished by: GSR on 20 March 2012 15:22
-
Several facts with some non-compliant sizes
Hi, in our data mart, I have multiple fact tables. The fact of JOBS table includes the dimensions of time, employee, org and employment.
Other fact tables include these 4 dimensions consistent basis, more specific dimensions to the fact. For example, BENEFITS includes a dimension 'plan type', etc.
When reporting, I want counts of the fact table basic JOBS will appear always - even if other data in the report contains the dimensions of "non-compliant". For example, I would like a report listing periods of time, used account (as the result of EMPLOYMENT) and joined County employee (as a result of the BENEFITS), something like this:
Month advantage Plan registered EMP EMP
Jan 2009 health insurance 10 000 8 000
Jan 2009 401 k Plan 10 000 4 000
Jan 2009 AD & D 10 000 1 000
When I try to produce this report, because the "benefit plan" is not a dimension linked to the JOBS data, the column of EMP comes out blank. Yes, I can add a total row to the bottm show... but I really want the 10,000 is displayed on each line (also because I want to calculate a % of the people listed on the total population).
What is the best way to achieve this? Also, as I have 4 or 5 other tables of facts, and each of them have their own 'personal' dimensions in addition to those in line.
Thanks in advance!
Scott@ASFK
What I was referring to was on the measure itself, not the LTS it is mapped to the content tab.
-
Query of Tables in different databases
I'm sure it's very simple, but I can't figure out how to query two tables information living in two separate databases.
E.g.
Select database1.table1.field1, database1.table1.field2, database2.table1.field1
of base2 outer join left database1 on database1.table1.field1 = database2.table1.field1
Any help would be appreciated!If you use "database" in the meaning of the Oracle, rather than in the sense that the other databases use the term (i.e. a "database" SQL Server is similar to an Oracle schema), you would need a database link.
In the database 1
CREATE [PUBLIC] DATABASE LINK dblink_name CONNECT TO username IDENTIFIED BY password USING tns_alias
Then
SELECT tab1.field1, tab2.fieldN FROM table1 tab1 LEFT OUTER JOIN table2@dblink_name tab2 ON (tab1.field1 = tab2.field1)
Justin
-
I have the following two tables:
Asset_Issued
Asset_Type_ID Assigned to 1 RAM 2 RAM 3 RAM 4 RAM 5 RAM 1 Riadh 3 Riadh 5 Riadh 1 Rajesh 3 Rajesh 2 Rajesh Asset_Type
Asset_Type_ID Asset_Name 1 Laptop 2 Desktop 3 Mouse 4 Keyboard 5 Monitor Can someone help me with the query that will give the following result.
Asset_Issued_Count
Asset_Name County Laptop 3 Desktop 2 Mouse 3 Keyboard 1 Monitor 1 Really? It's really basic things.
Select at.asset_name, count (*)
of asset_type to
Join asset_issued HERE on (ai.asset_type_id = at.asset_type_id)
At.asset_name group;
-
recursive query with two tables
Hello
Im having problems of recursive query construction and add to select the list to see the result in hierarchical mode, so I want to your advice.
I have two tables:
And I want to see the result like this:TABLE: t1 c_id parent_id c_level 1 - 1 2 1 2 3 1 2 4 - 1 5 4 2 6 5 3 TABLE: t2 c_id c_name 1 name1 2 name2 3 name3 4 name4 5 name5 6 name6
-Name1
-name2
-Name3
-Name4
-Name5
-name6
Could you please help me with this?
Or maybe can you provide good links where I can find solution how to SELECT LIST looks like the hierarchical tree?Here is my test scenario:
CREATE TABLE t1( c_id NUMBER, parent_id NUMBER, c_level NUMBER); CREATE TABLE t2( c_id NUMBER, c_name VARCHAR2(10)); INSERT INTO t1 VALUEs(1,NULL,1); INSERT INTO t1 VALUEs(2,1, 2); INSERT INTO t1 VALUEs(3,1, 2); INSERT INTO t1 VALUEs(4,NULL,1); INSERT INTO t1 VALUEs(5,4, 2); INSERT INTO t1 VALUEs(6,5, 3); INSERT INTO t2 VALUEs(1,'name1'); INSERT INTO t2 VALUEs(2,'name2'); INSERT INTO t2 VALUEs(3,'name3'); INSERT INTO t2 VALUEs(4,'name4'); INSERT INTO t2 VALUEs(5,'name5'); INSERT INTO t2 VALUEs(6,'name6'); SELECT LPAD('-',2 * a.c_level,'-') || b.c_name the_tree FROM t1 a, t2 b WHERE b.c_id = a.c_id CONNECT BY a.parent_id = PRIOR a.c_id START WITH a.parent_id IS NULL;
and the result:
THE_TREE ---------- --name1 ----name2 ----name3 --name4 ----name5 ------name6
I took the example you gave then perhaps your largest data set has the flaw?
Published by: SunDogCa on August 13, 2010 14:19
-
query by default two tables for block
Hello
How can I make defaulet query block of two tables?
I know it's default_query in set_block_property, but there is no clause only 'where' and I put clause of two tables. Is a solution?
concerningYou can use a block of Clause From database. This allows you to base a block on a complex query without having to create a view in the database. Here are the steps:
- Manually create a data block
- Create an item in the block for each column returned by the query - make sure that the data type is correct.
- In the block properties, set the following properties:
- Query data Source type = F R O M Clause query
- Data Source Name = your request
- Mode key = U p d a t a b l e
- Query data Source type = F R O M Clause query
- Manually create a data block
Note: If your query uses summary calculations, make sure you alias the result and ensure that matches alias name of the item in the data of block. It should also be noted that the blocks based on a F r o m query Clause are read-only. If you need be able to update the underlying tables, you can use transactional triggers or the block of data based on a procedure.
For a complete list of this process - Discover My Oracle Support Document ID: * 69884.1 - how to use F rom query Clause in forms *.
Hope this helps,
Craig B-)
If someone useful or appropriate, please mark accordingly.
Published by: Silvere on August 10, 2010 12:37
Help in mandatory query - pulling data from two tables and inserting a
Hi allI need your help for the modification of the query to get the desired result.
I have two tables A and b. using source Insert and select the command, I need to extract data from tables A and B, then insert and C.
Data and table structures are available below.
Table (Source Table)
Status of payment $
MUL DC 20
ONLY DC 20
ONLY 40 PA
MUL NY 50
Table B (Source Table)
State of lang units
E DC 10
S DC 10
NY E 5
PA S 5
Based on query, I need the values in table C as mentioned below.
Table C (Table of Destination) (necessary output query must also be as below)
The State value
PA 8
DC 1
My query is
INSERT INTO C(STATE,VALUE)
SELECT A.STATE, SUM ($) /SUM (UNITS)
OF A, B
WHERE PAYMENT = "SINGLE".
AND A.STATE = B.STATE
GROUP OF A.STATE, B.STATE
But the output I get is
PA 8
DC 2
Essentially to DC, I should get 1, i.e., for payment only $ DC is 20 and divided by 20 DC must be 1.
Let me know where I'm missing.
Hello
It will work you need to add units in the group by clause
SELECT a.state, SUM (dollars) / units
FROM a, (SELECT state, SUM (units) units
FROM b
GROUP BY state) sub
WHERE payment = 'SINGLE' AND a.state = sub.state
GROUP BY a.state, units;
Concerning
Insert two tables with a single query (same ID)
HelloI want to insert two tables at the same time (with a single request) provided that both records get inserted with the same identifier. How can I do this?
Table Movies
id
name
Table Category
movie_id
cat_type
(a) insert in the first table, retrieve the id (can be usingmy_sequence.currval
and then insert into another table.question: He brings three queries to the Database, I also suspect that when several people trying to insert there is a problem, I could be wrong.
I have no other idea.
Greatly appreciated!
think you need to do as an anonymous pl/sql block.
Dim cn As New OracleConnection("DataSource = xx'; user id = xx; password = xx;")
Try
'build the anonymous pl/sql
Dim sb as New System.Text.StringBuilder
sb.Append("declare")
sb.Append(" l_N number;")
sb.Append("begin")
sb.Append("insert into movies (id,name) values (my_sequence.nextval, 'film1') returning id into l_N;")
sb.Append( "insert into category values (l_N, 'Category type');")
sb.Append(" END;")
'create commd object
Dim cmd as New OracleCommand(sb.ToString,cn)
cmd.Connection.Open()
cmd.ExecuteNonQuerry()
cmd.Connection.Close()
cmd.dispose()
Catch ex as Exception
blah blah blah
End try
Published by: pollywog on May 28, 2010 10:48
Published by: pollywog on May 28, 2010 10:49
Reg: With the help of several tables of facts in the RPD!
Hi allCan I get help with the following scenario?
We use OBIEE 11 g.
We have a report that uses 1 single fact table to retrieve data and it must be hell a lot of time to display the data in the report.
My question is is there a way to show the performance of the report if divide us the data in table 1 to 2 fact tables and the report uses them 2 made tables.
Are there other ways of finalization of the report for better performance.
Thanks for the help in advance!
Ajay.
Hi Ajay,
Follow these steps for tuning;
1. try to adjust the SQL query generated first by the report, and then make the necessary changes. (Put index on the column that is required so that your query is scanning the index instead of the whole table)
2. you can try to create the agg fact table and use agg navigation to improve performance. (This is to reduce the data set on which sql is triggered)
3. you can try to create partitions on the table of FACTS in the comic book, and so held the partitions are queried according to the filters.
4. in the last if all the foregoing does not resolve your query, you can try to divide the FACT table in two or more depending on your decision and then use fragmentation content in the MDB of the RPD layer if it will strike appropriate tables depending on whether you declare.
Mark Correct/utile so this can help.
Good luck
Kashi
I have two tables I want to fix the end to end. If I use the version table it creates an annexed table which is not what I want. essntially im doing the opposite of WBS. are there features that fit this description?
in fact, I just found out 'insert into array' worked for me. I'll try you method too next time
getting data between two tables
Hi everyone, I need help with a query that seems simple, but I can't understand. consider the following data.
with data as (
s élire 802 cd from dual union all
select 803 cd from dual union all
select 804 cd from dual
data2 as
( select 804 cd from dual )
I want to join the two tables so that the result will be as follows:
in the above data, we can see that 804 is common in both tables. in this case, the output should be 804.
Similarly, if 2 data include the following:
data2 as
( select 804 cd from dual union all
Select 803 cd from dual
)
the output is then 803 804.
Now consider the following data
with data as (
s élire 802 cd from dual union all
select 803 cd from dual union all
select 804 cd from dual
)
take data2 table is empty
I want to join the two tables, and in this case, the output should be 802,803,804. data2 table is empty, then the default behavior is to get all the data in the data table. Since there is no line that corresponds to rows in the data table,
the default behavior is to display output all data in the data table. in this case 802,803,804
can someone write a query for this?
Hello
elmasduro wrote:
Hi Frank, thanks for the request. These are very good questions. Here are the answers
What happens if data2 rows, but none of them match data CD?
It won't happen because the integrity of the data.
...
I see it; a data line 2 will be in the data. You have a FOREIGN KEY constraint, or something similar, so if cd = 804 exists in database2, then it must also exist in the data.
What happens if the data is empty and data2 is not?
If data is empty and data2 is not, then the data2 data should be released.
for example
with the data as)
data table is empty
data2 as
(select cd 804 Union double all the)
Select cd 805 double
)
When you join data and data2 account with the above data, then the output should be 804 805. data2 data should be the display if the data table is empty. ...
Doesn't that contradict what you said earlier? Previously, it seemed to say that each row of data2 will be in the data, but now you give an example where all data2 lines are not in the data.
If the first is true, then the solution in response #2 should work.
If the latter is true, you can change the query like this:
WITH got_r_num AS
(
SELECT NVL (d.cd, d2.cd) AS cd
DENSE_RANK () (ORDER IN CASE
WHEN d.cd IS NOT NULL
AND d2.cd IS NOT NULL
THEN "A".
WHEN d.cd IS NOT NULL
THEN 'B '.
ANOTHER 'C '.
END
) AS r_num
DATA d
FULL OUTER JOIN data2 d2 ON d.cd = d2.cd
)
SELECT cd
OF got_r_num
WHERE r_num = 1
ORDER BY cd
;
How to include the total number of table one fact in another fact table to calculate the percentage
I have a fact table in the grain of each document created in any organization, say the 1st table of facts. I have another table of facts (2nd fact table) seen those documents which are considered by different commentators. grain of this second fact table is so each review, even if I document in both IDs the fact table.
Now, I want to calculate the percentage return documents reviewed. For this I need to divide count separate from the document of performance by the total performance document. Now this document of total performance can be obtained from the 1st table of facts, but I don't get how to bring this indictment in the 2nd table of facts to show the percentage.
Please let me know if there is no ambiguity in my question, because I'm a starter in OBIEE.
Thank you very much.
then you can set new logical column with two columns of fact in the formula
Hello experts...
I'm new to this forum and Oracle coding complex.
I have a task in which I want to compare two tables with the same structure, same columns. My Oracle database is 11g Release 2. I want this column-by-column comparison and save the result in a separate table. (say result_table)
The structure of the table would be as follows:
SQL > desc emp;
Name Null? Type
----------------------------------------- -------- ----------------------------
EMPNO NOT NULL NUMBER 4
ENAME VARCHAR2 (10)
JOB VARCHAR2(9)
MGR NUMBER(4)
HIREDATE DATE
SAL NUMBER(7,2)
COMM NUMBER(7,2)
DEPTNO NUMBER (2)
SQL > emp_comp desc;
Name Null? Type
----------------------------------------- -------- ----------------------------
EMPNO NOT NULL NUMBER 4
ENAME VARCHAR2 (10)
JOB VARCHAR2(9)
MGR NUMBER(4)
HIREDATE DATE
SAL NUMBER(7,2)
COMM NUMBER(7,2)
DEPTNO NUMBER (2)
Both of the tables EMPNO is the primary key.
I want to compare these two tables based on the EMPNO (EMPNO even is both tables).
The result log table would be as follows:
SQL > create table result_table
2 (check_sr_no, number (5),)
table_name 3 varchar2 (30),
ROW_ID 4 varchar2 (20).
column_name 5 varchar2 (20).
6 column_data varchar2 (1000).
compared_by 7 varchar2 (10));
Table created.
SQL > alter table result_table
2 Add the constraint result_table_pk
3 primary key (check_sr_no);
Modified table.
The name of the table and the name of the column will not be hardcoded (based parameter by user)
I tried to use the dbms_comparison package, but do not find comparison of column to column.
I also used by using the query operator LESS. It's showing the difference in rank.
I also went to https://asktom.oracle.com/pls/apex/f?p=100:11:0:P11_QUESTION_ID:2151582681236
Your help will be very appreciated.
Thank you
DK
Tom Kyte has answered this question MANY times over the years. Here are links for its solution
https://asktom.Oracle.com/pls/Apex/f?p=100:11:0:P11_QUESTION_ID:4934799800346640847
Maybe you are looking for
-
Pomp L855 - 11 p: AMD driver stopped responding and has recovered
HelloI bought a Sattelite L855 - 11 p a day ago. Since it first started, I have a problem with the ATI driver. At the time at the time, the PC is locked with yellow dots on the screen, and about 10 seconds later, I get following error messages for Wi
-
I have a VI in labview that accepts an array of a .NET and reading it with DAQmx, a value of every millisecond. I do the same thing with Veristand 2011, programmatically. As far as I understand it, looks like I can do this in 2 different ways: (1) wr
-
No signal HDMI when laptop start with closed lid (Y560)
I use an ASUS VW246H Panel as my main screen with my laptop Y560. When I start it, I get the loading Windows 7 fine on the external monitor screen but when Windows actually starts the dies of HDMI signal. Is it possible that I can do the default exte
-
I use outlook express 6 and I can receive an email of great but when I try to send it after making the necessary changes, i.e. the signature I get the message "too big for the server" responses I've seen so far tell me absolutely nothing
-
WAG160N exasperating dropouts/reliability
I myself bought a gateway WAG160N after I set up an ADSL service at my home last weekend. I have install the modem to the letter by the installation fast and installed guide the LELA utility to observe the State of the network. The modem has power, w