How can you replace the following SELECT statement with an outer join?

Posted by: Pdfprep Category: C_TAW12_750 Tags: , ,

CORRECT TEXT

You want to select data from two tables and store the result in as structure.

Table PARTNER contains the fields PARTJD and KIND.

Table CONTRACT contains the fields CONTJD, CONT_TYPE and DIVISION.

The structure is defined as follows

DATA: BEGIN OF wa_result,

Part_id type partner-partjd, cont_id type contract-cont_id, ConMype TYPE contract-cont_type,

END of wa_result,

Lt_result type table of wa_result.

How can you replace the following SELECT statement with an outer join?

SELECT partjd from partner INTO wa_result WHERE kind = ‘Residential’.

SELECT contjd from CONTRACT into wa_result-cont_id WHERE part EQ

wa_partner-part_id And DIVISION eq ‘Water’.

Append wa_result to lt_result.

ENDSELECT.

If sy-subrc<>0. CLEAR wa_result-cont_id

APPEND wa_result TO lt_result. ENDIF.

ENDSELECT.

Please choose the correct answer.
A . SELECT partjdcontjd from partner AS A LEFT JOIN contract AS b ON a-partjd = b-partjdAND b-division EQ ‘Water’ INTO TABLEIt_result WHERE kind = ‘Residential’
B . SELECT partjdcontjd from partner LEFT JOIN contract on partner-partjd = contract-partjd
AND partner-kind EQ ‘Residential’ INTO CORRESPONDING FIELDS OF TABLE lt_result
WHERE division eq ‘Water’.
C . SELECT partjdcontjd from partner AS A LEFT JOIN contract AS b ON a-partjd = b-partjd INTO CORRESPONDING FIELDS OF TABLE lt_result WHERE kind = ‘Residential’ and AND division EQ ‘Water’.
D . SELECT partjdcontjd from partner LEFT JOIN contract on partner-partjd = contract-partjd AND contract-division EQ ‘Water’ INTO TABLE It result WHERE kind EQ ‘Residential’.

Answer: C

Leave a Reply

Your email address will not be published.