Hello, I am trying to convert an Oracle script that uses (+) outer join sign so a SAS program that runs multiple scripts can run this as well. This script is to get an Assessment taken with all questions whether they answered them or not and return all the responses. Responses have data in the rows that match but if they didnt answer them then there is no data just questions not answered. Any help converting this would be greatly appreciated. I have tried many different ways but only get back answered questions. Thanks.
select ases.ases_key, ases.ases_id, ases.ases_desc, ases.ases_quest_key, ases.ases_quest_id, ases.ases_quest_desc, t.cse_id, t.mbr_ases_rspn_key, t.mbr_ases_key, t.rspn_txt
from
(select ASMT.ASES_KEY, ASMT.ASES_ID, ASES_DESC, Q.ASES_QUEST_KEY, Q.ASES_QUEST_ID, Q.ASES_QUEST_DESC from
ASSESSMENT ASMT
, QUESTION Q
where ASMT.ASES_KEY = Q.ASES_KEY
and ASMT.ASES_ID = 'CCS451') ASES
,
(select MA.ASES_KEY, MA.CSE_ID, MAR.RSPN_TXT
FROM
MEMBER_ASSESSMENT MA
, MEMBER_ASSESSMENT_RESPONSE MAR
WHERE MA.CSE_ID = '160177398'
AND MAR.MBR_ASES_KEY = MA.MBR_ASES_KEY(+)
) T
where T.ASES_KEY(+) = ASES.ASES_KEY
and T.ASES_QUEST_KEY(+) = ASES.ASES_QUEST_KEY
;
select ases.ases_key, ases.ases_id, ases.ases_desc, ases.ases_quest_key, ases.ases_quest_id, ases.ases_quest_desc, t.cse_id, t.mbr_ases_rspn_key, t.mbr_ases_key, t.rspn_txt
from
(select ASMT.ASES_KEY, ASMT.ASES_ID, ASES_DESC, Q.ASES_QUEST_KEY, Q.ASES_QUEST_ID, Q.ASES_QUEST_DESC from
ASSESSMENT ASMT
, QUESTION Q
where ASMT.ASES_KEY = Q.ASES_KEY
and ASMT.ASES_ID = 'CCS451') ASES
,
(select MA.ASES_KEY, MA.CSE_ID, MAR.RSPN_TXT
FROM
MEMBER_ASSESSMENT MA
, MEMBER_ASSESSMENT_RESPONSE MAR
WHERE MA.CSE_ID = '160177398'
AND MAR.MBR_ASES_KEY = MA.MBR_ASES_KEY(+)
) T
where T.ASES_KEY(+) = ASES.ASES_KEY
and T.ASES_QUEST_KEY(+) = ASES.ASES_QUEST_KEY
;