Sei sulla pagina 1di 2

Abstract: Having issues with 'Left Outer' joins

Description:
We are having some issue while doing joins to Dimension and Dimension extention tables.

We are using out of box 'Account' (W_ORG_D) table and this has been joined with some more extension tables like
'Vacation Profile', 'Model Score' (WC_RCI_ORG_VAC_DX, WC_RCI_MODELSCORE_DX) etc.

We have created Left outer joins between these tables. But now whenever we run any query using any of these tables, the
SQL query joins all the table irrespective of tables and fields actually used for creating request.

Please find the attached screen shots for refernce. And feel free to contact me for any questions.

Regards,
Activity Type: Resolution
GMT Created: 06/30/2005 16:26:50
Comment :
For the benefit of other users:

Analysis:
1. When left outer join is used, all the tables mapped to the Logical table are joined in the SQL formation, irrespective of
the columns selected in the result set. This is the expected behavior for Left outer joins. Only incase of inner joins, the SQL
formations excludes those tables from which no columns are selected.
2. The cause of the cartesian behavior is due to left outer join with Party login table (which consists of login ids of users
that have access to the account and hence contains multiple rows per account).

Suggested Solutions:
1. Use inner join for party login, instead of Left outer join. This would avoid cartesian join, as long as no columns are
selected from that table. This may not be the most efficient approach, but it does not involve any design changes.

2. Breakdown the single logical table in Business layer into multiple logical tables mapping to appropriate individual
physical tables, instead of consolidating into one logical table mapped to multiple physical tables. Though, this would
involve design changes, it will be more efficient.

Customer used aproach 1 and it eliminated cartesian join.

Keywords: Left outer join, cartesian join

Abstract: Outer Join Problem

Description:
Hi there,

I am attaching my repository here.


If you go to the logical layer, I have a logical table called 'SYM Rev- Opportunity(W_OPTY_D)'. It has one logical source
made up of multiple physical sources ('General' tab of the logical source).
The different physical sources feed 'Activities','Attachments' & 'Opportunity' presentation layers in 'Pipeline' subject area.
Now, coming back to the logical layer: I want to have an outer join in following fashion>
Rev_Opportunity(W_OPTY_D).INTEGRATION_ID=W_OPTY_ATTACHMENT_SYM_D.PAR_ROW_ID(+).
For this, I selected join type='Left Outer' for this join in the joins section of 'General' tab of logical source.
Instead of working fine, it is splitting even a simple query into multiple queries.
In the 'pipeline' subject area, selecting only 'Comments' from 'Attachments' folder, I would expect only one table,
W_OPTY_ATTACHMENT_SYM_D in the query, but the join is also including Rev_Opportunity(W_OPTY_D) instead which
is wrong.
Changing the join type from 'Left Inner' to 'Full Outer' also didn't help.

How can I have an outer join of this fashion as mentioned above?

Thanks & Regards,


Activity Type: Resolution
GMT Created: 06/17/2004 18:41:34
Comment :
For the benefit of other readers -
Customer has two physical tables :
Product -------- Product Type
TypeId TypeId
Name Type
....

linked by "TypeId".

In the business model, an Outer Join was defined between the two tables.

When a query to retrieve Name, TypeId from Product is issued, the generated SQL is actually :

select distinct "Name" as c1,


."TypeId" as c2
from
"Products" left outer join "ProductType" On Products."TypeId" = ProductTye."TypeId"

Notice the clause : "outer join ... " even though there are no columns from "ProductType" in the query.

Change request 12-MAY0M3 has been loged to address this issue.

Abstract: Outer Join issue with Oracle


Messages: 1 2

We are unable to get the outer join functionality to work properly against Oracle DB.

Some of the source tables we are working with have columns where nulls are used extensively, and without this
functionality working properly, we are dead in the water.

It is not feasible to populate the null columns, just to get the tool to work.

Any help you can provide will be greatly appreciated.


Activity Type: Resolution
GMT Created: 07/09/2002 00:31:40
Messages: 1 2

Comment :
For the benefits of the other readers:

The customer encountered the following error when run queries on an Oracle database, if some tables were outer joined:
[nQSError: 17001] Oracle Error code: 933, message: ORA-00933: SQL command not properly ended at OCI call
OCIStmtExecute.
[nQSError: 17010] SQL statement preparation failed.

Change Request 12-CJ9G5G has been logged to address this product defect: Siebel Analytics generates wrong SQL
syntax when using Outer Joins on Oracle) .
This behavior can be workarounded in the following ways:

Workaround 1:
Turn off Left-Outer Join from the database features table for Oracle.
The advantage of this method is that it is extremely simple to do and effective.
The inconvenient is that is could lead to unacceptable performance.

Workaround 2:
Encode the outer join in an opaque view.

Workaround 3.
Encode outer join in a materialized view.

Potrebbero piacerti anche