Discoverer changes joins
Hi, Gurus,
I have a problem with a Discoverer report. When I create this particular report, I have to select columns from three folders to create the necessary joins and to access another folder (this folder is grayed out until the joins are created). Then, I run the report (with the columns from the three folders still in the report). Next, I try to remove the columns because they don't need to be on the report. Now the problems start. Discoverer is creating outer joins that aren't in the Admin layer and its joining tables to themselves, which, as you can probably assume, changes the results for the report. I've also tried removing the columns before I run the report, but the same problem keeps occurring.
Do you have any idea why Discoverer is making these joins? I thought Discoverer should 'remember' the joins even if/after columns are removed. I'm using Plus 10.1.2.48.
Thanks for your help.
Instead of removing the columns from the report, can you just make the columns HIDDEN in the Sort tab?
Similar Messages
-
New to Discoverer have join/query question
I have the following query; I am trying to import it but when I do, discoverer only brings in one of the two OUTAGE_FACTOR fields. Can I not just import this? I have the other joins set up ie fiscal year, plan id and unit. Do I need to set up the outer joins in the business area first? I'm assuming that is why it is not importing both fields.
SELECT prev_y.OUTAGE_FACTOR LY,
curr_y.OUTAGE_FACTOR FYTD,
outage.unit_nme,
outage.jul,
outage.aug,
outage.sep,
outage.oct,
outage.nov,
outage.dec,
outage.jan,
outage.feb,
outage.mar,
outage.apr,
outage.may,
outage.jun
FROM OUTAGE_MONTH_MX outage, OUTAGE_YEAR_MV curr_y, OUTAGE_YEAR_MV prev_y WHERE outage.l_year_fiscal_year = 2006 and outage.plant_id = 'FPP' and outage.l_year_fiscal_year = curr_y.L_YEAR_FISCAL_YEAR and outage.plant_id = curr_y.PLANT_ID and
outage.UNIT_NME = curr_y.UNIT_NME and outage.l_year_fiscal_year - 1 = prev_y.L_YEAR_FISCAL_YEAR(+) and outage.plant_id = prev_y.PLANT_ID(+) and
outage.UNIT_NME = prev_y.UNIT_NME(+)Disco is also stripping the outer joins when I import the sql.
From sql inspector:
SELECT O100494.UNIT_NME, O100494.JUL, O100494.AUG, O100494.SEP, O100494.OCT, O100494.NOV, O100494.DEC, O100494.JAN, O100494.FEB, O100494.MAR, O100494.APR, O100494.MAY, O100494.JUN, O100535.OUTAGE_FACTOR
FROM STAR.OUTAGE_MONTH_MX O100494, STAR.OUTAGE_YEAR_MV O100535
WHERE ( ( O100494.L_YEAR_FISCAL_YEAR = O100535.L_YEAR_FISCAL_YEAR ) AND ( O100494.PLANT_ID = O100535.PLANT_ID ) ) AND ( O100494.UNIT_NME = O100535.UNIT_NME ) AND ( O100494.PLANT_ID = O100535.PLANT_ID ) AND ( O100494.L_YEAR_FISCAL_YEAR-1 = O100535.L_YEAR_FISCAL_YEAR ) AND ( O100494.UNIT_NME = O100535.UNIT_NME ) AND ( O100494.PLANT_ID = 'FPP' ) AND ( O100494.L_YEAR_FISCAL_YEAR = 2006 )
; -
How to Discoverer change workbook owner?
Using:
OracleBI Discoverer 10g (10.1.2.1)
Oracle Business Intelligence Discoverer Plus 10g (10.1.2.48.18)
Discoverer Model - 10.1.2.48.18
Discoverer Server - 10.1.2.48.18
End User Layer - 5.1.1.0.0.0
End User Layer Library - 10.1.2.48.18
Oracle Database 10g Enterprise Edition Release 10.2.0.3.0 - 64bi
How does one change the owner of a workbook?
The problem is when a user changes their name, then there Oracle database user name changes. The user needs to keep both user names. So
the reports must be re-assigned to the new user name and given access to the old user name that has ownership of the report.
Thanks.A) One way of doing this is to share the workbooks to the new userid and then the new userid saves th
em to the database as their own.
Ensure new userid is created with the EXACT same privileges as the old userid. The Discoverer Administrator must ensure the new userid has security to the EXACT same Business Areas and the same privileges as the old userid.
B)
1. Ensure new userid is created with the EXACT same privileges as the old userid. The Discoverer Administrator must ensure the new userid has security to the EXACT same Business Areas and the same privileges as the old userid.
2. The Discoverer Administrator must export the workbooks File - Export to an .eex file and generate an XML file.
3. The Discoverer Administrator must open the .eex file in Notepad or Wordpad and find the old userid and change manually to the new userid.
4. The Discoverer Administrator then imports File - Import the workbooks back into the EUL.
a) File -> Import
b) Add File
c) The .eex file that was just changed
d) Next
e) Step 2 here is very IMPORTANT ***" Only take ownership if original owner cannot be found "***
****CHECK THIS****
f) Start
g) Finish
5. Login with new userid into Desktop or Plus and then Open an existing workbook from the database and confirm all workbooks are there.
6. The first time you run the workbook Discoverer will prompt with 3 choices:
a) Open the workbook in the account where it was saved.
b) Open the workbook in the current database account. *** CHOOSE this one ***
c) Don't open the workbook.
*** Choose B and confirm the workbook can be seen and runs correctly. *** -
I've received complaints from my users saying that their Universe is using left outer join, as they created a webi report against that universe....when they view the SQL in the Webi report, it changed the left outer join to right outer join...therefore, it gave inaccurate data ouput.....Can someone help me with this issue? Thank you very much for your time and help.
Hi Brian, you need to check on the universe to make sure you are NOT setting up right-outer join accidentally. If you are not implementing the outer-join parameter on the universe but instead using only the + sign, it is very easy to put it on the wrong side.
This thread belongs to the Universe forum and therefore, I am moving it.
If you are using the SAP BusinessObjects tool, you should join [ASUG|www.asug.com] -
Manipuilate joins dynamically.
Hi All,
I would need an help on the query.
I have a table x and column a, b,c, y and z in them.I am joining this table with another table c
IF the column y is not NULL and if z='M' THEN I have to join table c with d
IF the column y is not NULL and if z='N' THEN I have to join table c with e
IF the column y is not NULL and if z='O' THEN I have to join table c with f
Can anubody help me in how to build this join in SQL level???
Thanks in advance.Generally speaking if you can use UNION(ALL)s for a table(or a view), it is easy to rewrite it with WHERE ... OR ... OR ...
For example:
SELECT select-list
FROM Table_x
WHERE some_predicates
UNION
SELECT select-list
FROM Table_x
WHERE aother_predicates
UNION
SELECT select-list
FROM Table_x
WHERE somemore_predicates
;It would be able to rewrite to:
SELECT select-list
FROM Table_x
WHERE some_predicates
OR aother_predicates
OR somemore_predicates
;Returning to your original problem, my question is that with what column in table x be joined a column(d,e or f) of table c?
Although I assumed temporarily to join table c with column y in table x,
it is easy to change joined column in table x.
I don't know the performance of this, but I thought that it would work:
SELECT *.x, *.c
FROM table_x x
LEFT OUTER JOIN
/* or INNER JOIN */
table_c c
ON y IS NOT NULL
AND
( z = 'M' AND c.d = x.y
OR
z = 'N' AND c.e = x.y
OR
z = 'O' AND c.f = x.y
; -
Hi
We have one ad-hoc model and there seems to be problem with one of the report.This report doesn't render all the expected record.
e.g. Policy and country table have relationship , looks like there seems to have some problem with one country code, due to that business is not able to get few policies .
To overcome that, there are suggestions to change Join between these 2 table and make left join so that we are able to pull all polices irrespective of country code.
I am very new to ad-hoc and not aware of if there are option of changing join between tables in ad-hoc model. when I open the solution, I don't find any option but relationships .
Any suggestion how to change join type between these two tables ?
GaurHi Thanks for your reply and I think it's good suggestions, however I found one small solution for my problem,
There is a property called "Cardinality" which can be used to define kind of join. Below is little detail which I gathered :-
Cardinality One means that a record always exists at the target of the role. For instance, if I have entities Customer and Order, and I have a Customer role on the Order entity, a cardinality of One for Customer means that there is always a single Customer
record for each Order. A cardinality of OptionalOne means that there is zero or one Customer for each Order (in other words, some Orders may not have any Customer--the CustomerID might be null, or point to a Customer that doesn't exist anymore, etc). FK constraints
on non-null FK columns in the database can be used to enforce this.
Similar concept for Many and OptionalMany. Many means that there is always at least one record at the target of the role. So using Customer and Order as above, the Orders role on the Customer entity could be Many cardinality if your system guarantees that
all Customers have at least one or more Orders. There are no constraints in the database that could be used to enforce this, so in practice you will usually use OptionalMany and not Many.
The only effect of using the non-optional One or Many that I can recall off the top of my head is that we will use INNER JOINs when possible if the cardinality is one/many, while we will always use LEFT OUTER JOINs when the cardinality is optional one/many.
Using INNER JOIN can give you performance benefits in some situations.
Gaur -
How to hint hash join order on indexes ?
Hi,
in my 9.2.0.8 DB I've got query like this:
SELECT COUNT (agreementno) cnt
FROM followup
WHERE agreementno = :v001 AND actioncode = :v002 AND resultcode = :v003;
Plan
SELECT STATEMENT CHOOSECost: 11 Bytes: 18 Cardinality: 1
5 SORT AGGREGATE Bytes: 18 Cardinality: 1
4 VIEW index$_join$_001 Cost: 11 Bytes: 18 Cardinality: 1
3 HASH JOIN Bytes: 18 Cardinality: 1
1 INDEX RANGE SCAN NON-UNIQUE IDX_FOLLOWUP06 Cost: 13 Bytes: 18 Cardinality: 1
2 INDEX RANGE SCAN UNIQUE PK_FOLLOWUP Cost: 13 Bytes: 18 Cardinality: 1 I need to change join order of indexes, so the proble one would be PK_FOLLOWUP .
Of course the best plan is index range scan on pk but during to hight CF Oracle is combining 2 indexes .
Regards.
GregHmm sorry for red-herring.
I guess you could also consider hand-coding the index join, something like:
SELECT /*+ ORDERED USE_HASH (b) */
COUNT (a.empno)
FROM (SELECT e.empno
FROM emp e
WHERE e.empno > 7000) a,
(SELECT e.empno
FROM emp e
WHERE e.ename LIKE 'S%') b
WHERE a.ROWID = b.ROWID;or...
WITH e AS
(SELECT e.empno, e.ename
FROM emp e)
SELECT /*+ ORDERED USE_HASH (b) */
COUNT (a.empno)
FROM e a, e b
WHERE b.ename LIKE 'S%'
AND a.empno > 7000
AND a.ROWID = b.ROWID; -
Joining bridge ,dim,fact table
Hi
I have scenario where I have a bridge table,dimension table,and 2 fact tables.
The dimension table is a common table for both fact tables.
The bridge table contains the dimension tables Primary key.
The bridge is also having an other dimension table PK, but that table is not joined to any fact table.
Now I have a req where I have to get a column from bridge table and fact2 tables.
Individually when I pull those columns I am getting data.
When I pull those 2 columns together , getting " the specified criteria dint result in any data".
Tried changing joins in RPD nothing worked.please help me , this is very urgent.
In SQL developer when I joined bridge and fact or dimension and bridge I am able to get expected results.
Thanks
SrHi Suyog,
Run this Program in SE38 SAP_INFOCUBE_DESIGNS .
This gives the Ratio aswell number of records.And also Dimension Mismatch.
Rgds
SVU -
Hello
If I have existing reports in production and I make universe changes (adding or changing joins and or contexts), will the reports automatically use those changes? Or I need to modify the report in some way?t?
thanks for your help!
FrankHi Frank,
It all depends on the changes you are making to the universe, as long as you are not deleting the objects that were used in the report changing a universe doesn't effect.
Also when you make changes to the universe, don't forget to export to the repository. After the changes were made to the universe, if you want to see the report to current, all you need to do is refresh , doing refresh would fetch the data from the DB using universe. -
Migrating EUL changes to from instance to instance
In our EUL we have certain folders that are being shared between two different business areas. I wish to remove the folders from one of the business areas; is there any way to do this using the export/import functionality? We are using Discoverer 10g.
I realize that this can be done using the "manage folders" functionality, but we are trying to migrate all Discoverer changes using export/import to simplify the migration process.
ThanksHi,
Which folders are held in a business area is exported with the business area. So if you export the folders but not the business area then the folders will not be put in this business area when they are imported.
Rod West -
Master With Two detailsin discoverer
Hi ,
I would like to know your advice on the following .
I Have this familiar data model :
Master Folder : Items.
Detail 1 Folder : Sales.
Detail 2 Folder :Purchase .
Detail....
It is required to build a comparsion between item sales and purchase in specific period .
when i join the folders the sql inspector shows a long query with wrong join.
to Knowledge thier is a problem in discoverer regarding this type of queries.
My question How i overcome this ? do i build a view or thier is a trick in discoverer ?
Best Wishes .Hi ,
I know this would be strange ,but i have checked my joins many times.
The sql inspector show that Discoverer is joining wrong Items. Here is part of my
long query :
WHERE (i100232 = i100233(+) AND i100248 = i100251(+)) GROUP BY i100231, i100248, i100232 ) on1056
WHERE ( (in1058 (article code )= ( comp_code)in1090 AND in1061 = in1093))
GROUP BY in1086, in1058;
I don know how it is joinging article code to company code !!.
Any way is thier another idea to implement models that involve master with many details in discoverer ? Or do i consider item as detail and sales and purchase as maters tables so i avoid fan trap regarding many-many relation ( duplication of rows) ?
Please Advise . -
Is it feasable for a shop that is heavily dependent on hints to also take periodic statistics on tables and indexes? CBO is heavily dependent on stats, doesn't it make sense that they should be periodically refreshed, even in a shop that cooks the plans with hints?
Any helpful input will be appreciated> Without any refreshed stats, the optimizer would be just as effective as the hints.
I've read that sentence several times and I still don't understand it.
If a table/column/partition etc is missing stats then from 10g onwards the optimizer will use dynamic sampling. This can be very effective although it probably suits batch systems better than OLTP since a decent amount of dynamic sampling takes a little time. Since it is not usually as thorough as a full analyze job, you can also miss skewed data values and thus be unlucky with the plan.
If the stats are present but inaccurate then you could again be unlucky with the execution plan if they are significantly out on something that affects the optimizer's choice of index, join order etc.
If you are relying entirely on hints, then they had better be complete enough so that they do not leave the optimizer any room to choose a different plan that honours the hints but is not quite what you meant. You may think you are getting plan stability, but plans can still change when (if there are no stats) dynamic sampling discovers changed data volumes, selectivity etc, or (if you have old stats you don't update) time moves on and your queries use dates that are further and further away from the values described in the old stats (ask me how I know). I'm sure there are other ways to hit this type of issue. Another is to upgrade the database and find that your hints relied on odd bits of optimizer behaviour that have now changed.
A general problem with hints IMHO is that the optimizer has more possible approaches to any complex query than you or I can probably think of, and often the plan it comes up with is one you didn't expect but that actually works well. To produce that same plan explicitly and reliably using hints would require the same knowledge of optimizer rewrites, transformations, complex view merging, predicate pushing, hash join ordering, parallel execution and so on as the optimizer itself. It is therefore better to use hints to correct cases where the optimizer can gets things wrong, and better still to find the root cause within the stats. -
Whats the difference between these two queries ? - for tuning purpose
Whats the difference between these two queries ?
I have huge amount of data for each table. its takeing such a long time (>5-6hrs).
here whice one is fast / do we have any other option there apart from listed here....
QUERY 1:
SELECT --<< USING INDEX >>
field1, field2, field3, sum( case when field4 in (1,2) then 1 when field4 in (3,4) then -1 else 0 end)
FROM
tab1 inner join tab2 on condition1 inner join tab3 on condition2 inner join tab4 on conditon3
WHERE
condition4..10 and
GROUP BY
field1, field2,field3
HAVING
sum( case when field4 in (1,2) then 1 when field4 in (3,4) then -1 else 0 end) <> 0;
QUERY 2:
SELECT --<< USING INDEX >>
field1, field2, field3, sum( decode(field4, 1, 1, 2, 1, 3, -1, 4, -1 ,0))
FROM
tab1, tab2, tab3, tab4
WHERE
condition1 and
condition2 and
condition3 and
condition4..10
GROUP BY
field1, field2,field3
HAVING
sum( decode(field4, 1, 1, 2, 1, 3, -1, 4, -1 ,0)) <> 0;
[pre]My feeling here is that simply changing join syntax and case vs decode issues is not going to give any significant improvement in performance, and as Tubby points out, there is not a lot to go on. I think you are going to have to investigate things along the line of parallel query and index vs full table scans as well any number of performance tuning methods before you will see any significant gains. I would start with the Performance Manual as a start and then follow that up with the hard yards of query plans and stats.
Alternatively, you could just set the gofast parameter to TRUE and everything will be all right.
Andre -
Whats the difference between the two XMP packet tags
Hi,
I opened a file Bluesquare.indd(from XMP SDK sampke) and I found two XMP packets inside the file.
One packet with tag
and another one with tag
When I tried to extract the xmp using getXMP() method from XMPFiles then, I got the packet with tag
So can you tell me, what is the difference between two packets, why they are different
what is its use.
Thanks & Regards,
Venkatesh.EMy feeling here is that simply changing join syntax and case vs decode issues is not going to give any significant improvement in performance, and as Tubby points out, there is not a lot to go on. I think you are going to have to investigate things along the line of parallel query and index vs full table scans as well any number of performance tuning methods before you will see any significant gains. I would start with the Performance Manual as a start and then follow that up with the hard yards of query plans and stats.
Alternatively, you could just set the gofast parameter to TRUE and everything will be all right.
Andre -
Stacked bar chart showing zeros when there is no data
Hi,
I am developing a stacked bar chart which plots month vs sales of 3 different products.
I am showing data points and the total sales on chart. Every thing looks good except the zeros displayed on the chart if there are no sales for a product for a particular month... how to get rid of these zeros ? i mean how to display the value only if there is some data ?
ThanksSounds like you have a left outer join from your product table to the sales data. Thus product is listed even when no data present.
Try changing join to Equal
Ian
Maybe you are looking for
-
I asked this question before but I can't find it now. Anyway, I'm trying to import a DVD video that was made on a MAC and use it on a new iMovie project. How do I do the importing.
-
Urgent: Problem in validation created in T code OB28
Hi, Because of some requirement . i did created a validation in OB28 for a specific company code.After saving that validation ,code was automatically generated in include GBTI6FID code:FORM VAL_AJAY. NEW_SIM_TRACE_AJAY
-
I'm getting the following error in BPEL logs, can anybody tell me what the problem might be? <PerformMessageHandler::handleLocal> Processing workitem perform message 7207-BpTer4-BpSwt1.29-1 for domain default <AbortMessageHandler::handleLocal> Proces
-
My Ipad 2 has suddenly started losing wifi connection.
My ipad 2 (3 months old) has suddenly developed a problem that it loses wifi connection in my house. Laptop works fine from same location. Happened since installing latest apple software upgrade 1.51. Network reset and factory restore not helped. W
-
Javadoc overview.html file location
Running NetBeans on MS/Windows. I would like to check in the entire NB project via cvs and include the Javadoc overview.html in the package. However the person who checks it out can put their project pretty much anywhere they want. Unless I'm way wid