09-30-2005 7:45 AM
Hi all,
Could anyone let me know regarding Joins. What is the difference b/w inner and outer joins. And left outer join, right outer joins...
Thanks
Chand
09-30-2005 7:51 AM
Hi chand,
below link will help you.
http://help.sap.com/saphelp_erp2004/helpdata/en/cf/21ec77446011d189700000e8322d00/frameset.htm
http://help.sap.com/saphelp_erp2004/helpdata/en/f1/713c3b35703079e10000000a114084/frameset.htm
reward points for helpfull answers and close the thread if your quesiton is solved.
regards
venu.
09-30-2005 7:51 AM
Hi chand,
below link will help you.
http://help.sap.com/saphelp_erp2004/helpdata/en/cf/21ec77446011d189700000e8322d00/frameset.htm
http://help.sap.com/saphelp_erp2004/helpdata/en/f1/713c3b35703079e10000000a114084/frameset.htm
reward points for helpfull answers and close the thread if your quesiton is solved.
regards
venu.
09-30-2005 7:53 AM
Hi
JOIN is always applied betweeen two tables. If u want to get all matching records from both table u use Inner Join on aparticular field. Records in both table having the same value for that field will be retrieved with he Join. Usually we use it to relate the parent and child tables.
Incase of Outer Joins, even if there is not common value for that field on which we r joining, the records will be fetched. For the table row that doesnt have the value, NULL will be inserted. If u want NULL to be inserted on the table on the Left, use Left Outer Join and if u want NULL to be inserted for absent values in the right, use right outer Join.
09-30-2005 7:53 AM
09-30-2005 7:59 AM
Chand,
Look up SAP Help under SELECT and the FROM clause explains JOINS.
Basically an INNER JOIN means that the link must exist in both tables to return a result.
Table 1
A B C D E
-
a1 b1 c1 d1 e1
a2 b2 c2 d2 e2
a3 b3 c3 d3 e1
Table2
E F G
-
e1 f1 g1
e2 f2 g2
Inner join gives
A B C D E F G
-
a1 b1 c1 d1 e1 f1 g1
a2 b2 c2 d2 e2 f2 g2
a3 b3 c3 d3 e1 f1 g1
An OUTER JOIN (or left outer join) means that the data must exist in the left table but not necessarily in the right table:
Table 1
A B C D E
-
a1 b1 c1 d1 e1
a2 b2 c2 d2 e2
a3 b3 c3 d3 e3
Table2
E F G
-
e1 f1 g1
e2 f2 g2
Outer Join gives
A B C D E F G
-
a1 b1 c1 d1 e1 f1 g1
a2 b2 c2 d2 e2 f2 g2
a3 b3 c3 d3 e3
Hope this helps.
CHeers,
Pat.
PS. Kindly assign Reward Points to the posts you find helpful.