Application Development and Automation Discussions
Join the discussions or start your own on all things application development, including tools and APIs, programming models, and keeping your skills sharp.
cancel
Showing results for 
Search instead for 
Did you mean: 
Read only

Relationship between tables while using inner joins.

Former Member
0 Likes
816

Hi,

I had a few clarifications on "inner joins", and as i was going through the forum, i came across two points,

1. In one of the threads it said " inner joins is applicable for tables that have a parent child relationship.

2. In another thread it said " inner join is established from master table (the table on the left) to the transcation table (the table on the right)".

I have two clarifications based on the above points.

1. Is it necessary that the tables on which im performing an inner join should have a parent-child/children relationship or is it enough that the tables just have a common field.

2. Also is it necessary that the master table should come first, (or can i use any child table from where i can fetch the records when there is a mater table in my report) as shown below.

Eg: select * <fields> from <master table> inner join <table> on <field> into <itab>.

Edited by: Narayananchandran on Dec 27, 2010 12:31 PM

1 ACCEPTED SOLUTION
Read only

Sandeep_Panghal
Product and Topic Expert
Product and Topic Expert
0 Likes
755

I have two clarifications based on the above points.

1. Is it necessary that the tables on which im performing an inner join should have a parent-child/children relationship or is it enough that the tables just have a common field.

2. Also is it necessary that the master table should come first, (or can i use any child table from where i can fetch the records when there is a mater table in my report) as shown below.

1.Common field is enough.

2. There is no such rule.

5 REPLIES 5
Read only

Sandeep_Panghal
Product and Topic Expert
Product and Topic Expert
0 Likes
756

I have two clarifications based on the above points.

1. Is it necessary that the tables on which im performing an inner join should have a parent-child/children relationship or is it enough that the tables just have a common field.

2. Also is it necessary that the master table should come first, (or can i use any child table from where i can fetch the records when there is a mater table in my report) as shown below.

1.Common field is enough.

2. There is no such rule.

Read only

anjan_paul
Active Contributor
0 Likes
755

Hi,

1. Is it necessary that the tables on which im performing an inner join should have a parent-child/children relationship or is it enough that the tables just have a common field.

2. Also is it necessary that the master table should come first, (or can i use any child table from where i can fetch the records when there is a mater table in my report) as shown below.

Eg: select * <fields> from <master table> inner join <table> on <field> into <itab>.

ans:

1 . You have to take every common fields not partial.

2. There is no such rule

Read only

Former Member
0 Likes
755
 have two clarifications based on the above points.
1. Is it necessary that the tables on which im performing an inner join should have a parent-child/children relationship or is it enough that the tables just have a common field.
2. Also is it necessary that the master table should come first, (or can i use any child table from where i can fetch the records when there is a mater table in my report) as shown below.
Eg: select * <fields> from <master table> inner join <table> on <field> into <itab>

1) NO 2) NO

Read only

Former Member
0 Likes
755

Hi,

1. It is not necessary that the tables on which im performing an inner join should have a parent-child relationship. There is no such rule.

2. Also it is not necessary that the master table should come first. Tables can come in any sequence.

Read only

Former Member
0 Likes
755

Hi,

Check the relation in SQVI transaction and check whether any join exists for the table you want to Join.

for your questions the SQVI transation will be the right Answer.

prabhudas