2008 May 13 5:45 AM
Can anyone please tell me about the different types of joins ..... Pleaseeee
2008 May 13 7:13 AM
Hi,
This link should give you good understanding about joins.
http://www.databasedev.co.uk/query_joins.html
Regards,
2008 May 13 5:46 AM
2008 May 13 5:48 AM
2008 May 13 5:53 AM
Joins are of 2 types , Inner join and Left Outer Join.
Check these links..for explanation.
http://help.sap.com/saphelp_nw70/helpdata/en/cf/21ec77446011d189700000e8322d00/content.htm
http://help.sap.com/saphelp_nw04/helpdata/en/67/7e4b3eaf72561ee10000000a114084/content.htm
http://help.sap.com/saphelp_46c/helpdata/EN/50/a71ec8f65911d296390000e82de14a/content.htm
Regards,
Satya.
2008 May 13 6:00 AM
one more link:
[ABAP Joins|http://help.sap.com/saphelp_nw70/helpdata/EN/fc/eb39c4358411d1829f0000e829fbfe/content.htm]
2008 May 13 6:19 AM
Joined Table
Joined tables are used in a select statement to combine data from two or more tables that share one or more columns.
With Open SQL for Java you can use inner join and left outer join.
THERE ARE 2 TYPES OF JOINS, INNER AND OUTER JOINS.
Inner Join:
In case of inner join there should be an entry in all the tables use in the view.
Outer Join:
With the use of outer join you can join the tables even there is no entry in all the tables used in the view.
Syntax:
inner join :
select P<fieldname> d<fieldname> into corresponding fields of table <internaltable> from ( <table> as p inner join <table> as d on <join condition> and <cond>.
Eg.
suppose tables LFA1 ,EKKO.
select alifnr aname1 a~ort01
bebeln bebelp
from a as LFA1 inner join b as EKKO on
alifnr = blifnr.
OUTER JOIN
in the outer join the results may also contain entries that donot have corresponding entries in both the tables that comprise the join instead they are present in any of the one
SYNTAX
outer join:
select P<fieldname> d<fieldname> into corresponding fields of table <internaltable> from ( <table> as p left outer join <table> as d on <join condition> and <cond>.
LEFT OUTER JOIN
At LEFT OUTER JOIN, results tables can also contain entries from the designated left hand table without the presence of corresponding data records (join conditions) from the table on the right. These table fields are filled by the database with null values and are then initialized according to ABAP type.
RIGHT OUTER JOIN
At RIGHT OUTER JOIN, results tables can also contain entries from the designated right hand table without the presence of corresponding data records (join conditions) from the table on the left. These table fields are filled by the database with null values and are then initialized according to ABAP type
2008 May 13 7:07 AM
THanks for your valuable answer.
Where can i find this documentaion ?
Can i have a diagramatical view if tables having the entries and how they are joined ?
2008 May 13 7:13 AM
Hi,
This link should give you good understanding about joins.
http://www.databasedev.co.uk/query_joins.html
Regards,
2008 May 13 7:36 AM
Hi Manjunath CN ,
in your ABAP Editor write JOIN and press F1 .Then you will get detail description for Inner join and outer join.
Hope this solve your problem.
Please reward points if found helpful.
Thanks and regards,
Rajeshwar.