Answer the question
In order to leave comments, you need to log in
Oracle SQL, am I doing a JOIN of myself correctly?
Hello! There is an MSEG table of the following form, where MBLNR is part of a composite key, and BWART is a simple field:
+--------+-------+
| MBLNR | BWART |
+--------+-------+
| 000001 | 531 |
| 000001 | 561 |
| 000001 | 591 |
| 000002 | 531 |
| 000002 | 591 |
+--------+-------+
SELECT A.MBLNR
FROM MSEG A
, MSEG B
, MSEG C
WHERE
A.MBLNR = B.MBLNR AND
A.MBLNR = C.MBLNR AND
A.BWART = '531' AND
B.BWART = '561' AND
C.BWART = '591'
AND ROWNUM <= 10
Answer the question
In order to leave comments, you need to log in
Didn't find what you were looking for?
Ask your questionAsk a Question
731 491 924 answers to any question