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

query sql

Former Member
0 Likes
1,213

if two tables do not have fields in common, how do you make a relationship between the two tables or make sure you use both?

( join of table? database logical? )

1 ACCEPTED SOLUTION
Read only

sdsunny372
Active Participant
1,135

Hi Nick Reyan,

In this kind of scenario,we need to use mediator table for joining.

For brief understanding have a look on below example.

Example:-

In our past requirement ,we were trying to find join between EBAN & AFIH. Astehre is no direct link between these 2 tables,so we had used mediator table EBKN.

So joinings flow is EBAN -> EBKN ->AFIH

1)Between EBAN-EBKN tables

EBAN.BANFN = EBKN.BANFN & EBAN.BNFPO = EBKN.BNFPO

2)Between EBKN-AFIH tables

EBKN.AUFNR = AFIH.AUFNR

Best Regards,

Sagarkumar Darji

5 REPLIES 5
Read only

Sandra_Rossi
Active Contributor
0 Likes
1,135

"logical database" is obsolete since XXth century...

Read only

FredericGirod
Active Contributor
1,135

if you have two tables without relation, you cannot create relation

are they standard tables ?

Read only

Former Member
0 Likes
1,135

yes, the tables are standard

Read only

sdsunny372
Active Participant
1,136

Hi Nick Reyan,

In this kind of scenario,we need to use mediator table for joining.

For brief understanding have a look on below example.

Example:-

In our past requirement ,we were trying to find join between EBAN & AFIH. Astehre is no direct link between these 2 tables,so we had used mediator table EBKN.

So joinings flow is EBAN -> EBKN ->AFIH

1)Between EBAN-EBKN tables

EBAN.BANFN = EBKN.BANFN & EBAN.BNFPO = EBKN.BNFPO

2)Between EBKN-AFIH tables

EBKN.AUFNR = AFIH.AUFNR

Best Regards,

Sagarkumar Darji

Read only

ThangaPrakash
Active Contributor
1,135

what are the 2 tables which you are referring to? Once you provide we will try to check how both can be linked