on 12-30-2009 9:29 AM
Hi,
I need to join 3 Tables using SAP Query. I wish an OUTER JOIN to be performed for the table join.
For Example:
Table 1 has 1000 Entries Field A Field B
Table 2 has 300 Entries Field A Field C
Table 3 has 100 Entries Field A Field D
The normal Join (INNER JOIN) gives me only the records that exists in all the 3 Tables.
But what i need is:
In the above example, If one entry in Table 1 has no matching records in Table 2 / Table 3, there should be an output entry in the SAP Query like
Field A Field B Field C Field D
xxxx yyyy Blank Blank
If there is a common record that exists in the tables, that record should appear in the same entry in the Query output.
Field A Field B Field C Field D
xxxx yyyy zzzz aaaa
In this way, there should be a minimum of 1000 entries (Largest no of records in the Tables joined). More than 1000 records in the Query output depends on the number of common records.
Kindly help if you have come across such a scenario.
thanks & regds
sriram
Hi
Please join the outer join as below
Table1 with Field A to Table 2 Field A-----outer join
Table1 with Field A to Table 3 Field A------outer join
then you get the out put as per your requirement
Regards
Damu
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
User | Count |
---|---|
108 | |
12 | |
11 | |
6 | |
5 | |
4 | |
3 | |
3 | |
3 | |
3 |
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.