Hi,
I keep getting error messages on the IN condition in my sas code, cannot figure out what went wrong. Any feedback would be appreciated!
PROC SQL;
CREATE TABLE GR_SCH AS
SELECT SUM(C.STU_SECTN_CRED) AS SCH
FROM SID.SID_COURSES_TAKEN C
WHERE C.TERMID IN ('202005', '202008', '202101') AND C.BENCH='E' AND C.CRS_NBR > '4999'
AND (C.CIP_CRS NOT IN ('511201', '513818', '512308', '512001') OR
C.OASIS_PIDM IN
(SELECT NEW_VAL
FROM DWHOUSE.HUB_XREF_RULE_V_D3 R
WHERE R.SOURCE_NAME = 'HUB' AND R.KEY_WORD = 'IPEDS'
AND R.QUALIFIER = '12M_EX_IN' AND R.IN_VAL1 = '20202021'
AND R.IN_VAL2 = '1USF' AND R.EFFECTIVE_STATUS = 'A'
AND R.EFFECTIVE_DATE =
(SELECT MAX(F.EFFECTIVE_DATE)
FROM DWHOUSE.HUB_XREF_RULE_V_D3 F
WHERE F.XREF_ID = R.XREF_ID
AND INPUT(F.EFFECTIVE_DATE, yymmdd10.) <= TODAY())));
QUIT;
... View more