cancel
Showing results for 
Search instead for 
Did you mean: 

If we detect cardinality automatically in IDT, why the join is been done using outer join?

Former Member
0 Kudos

I have two tables city and customer. I join them and detect cardinality automatically.

When i check column values of city_id,first_name and last_name from tables city and customer,the join between tables is done by outer join

SELECT

  Customer.last_name,

  Customer.first_name,

  City.city_id

FROM

  Customer,

  City,

  { oj City LEFT OUTER JOIN Customer ON City.city_id=Customer.city_id }

but when i set the cardinality manually the join is done by an equi-join.why?

SELECT

  Customer.last_name,

  Customer.first_name,

  City.city_id

FROM

  Customer,

  City

WHERE

  ( City.city_id=Customer.city_id  )

Accepted Solutions (1)

Accepted Solutions (1)

former_member182521
Active Contributor
0 Kudos

Automatic cardinality detection is based on the number of matching records for the particular column and particular value in both the tables. If you try to set it manually(equi join) the default join type will be opted.

Former Member
0 Kudos

thanks,but when we detect cardinality automatically why does join is done using outer join

Former Member
0 Kudos

Hi,

I must disagree here, actually cardinality should not set the join type:

http://help.sap.com/businessobject/product_guides/boexir4/en/xi4sp5_info_design_tool_en.pdf#page=134

Best regards

Former Member
0 Kudos

I checked it practically,it does. check the previous response.I have added the sql query generated

Former Member
0 Kudos

Hi,

I agree with Victor, in that, cardinality and join-type should not be dependent.

I think, due to one-to-many nature of the particular scenario (City-Customer) the tool is presenting the user a chance to see 'all' values of the city even if the customer does not reside.

Whatever the case, but the join-type should not be forced. You might want ot raise this with SAP team.

Thanks,

Prathamesh

Answers (0)