08-08-2014 02:37 PM
I want to compare two columns together using the highlighted syntax but SAS is not allowing me to do that. Is there an alternative for this?
select distinct A.OFFRG_N,
case when (A.OFFRG_N, A.CRT_TS) in
(select OFFRG_N, CRT_TS from CSTST231_PMRINSD
where BUSN_TY_SEG_C = 'New' or BURN_TY_SEG_C = 'Renl')
end as PMR_BK_D
from CSTST231_PMRINSD A, CCTRP101_OFF_TERM B
where A.OFFRG_N = B.OFFRG_N
and A.CRT_TS = put(B.OFFRG_TM_CRT_TS,datetime26.)
NOTE: Remote submit to MYNODE commencing.
969 proc sql;
970 create table TEST_RESULT as
971 select distinct A.OFFRG_N,
973 case when (A.OFFRG_N, A.CRT_TS) in
ERROR 22-322: Syntax error, expecting one of the following: !, !!, &, ), *, **, +, -, /, <, <=,
<>, =, >, >=, ?, AND, BETWEEN, CONTAINS, EQ, EQT, GE, GET, GT, GTT, IN, IS, LE,
LET, LIKE, LT, LTT, NE, NET, NOT, NOTIN, OR, ^, ^=, |, ||, ~, ~=.
ERROR 76-322: Syntax error, statement will be ignored.
974 (select OFFRG_N, CRT_TS from CSTST231_PMRINSD
975 where BUSN_TY_SEG_C = 'New' or BURN_TY_SEG_C = 'Renl')
976 then A.PMR_BK_D
977 else NULL
978 end as PMR_BK_D
979 from CSTST231_PMRINSD A, CCTRP101_OFF_TERM B
980 where A.OFFRG_N = B.OFFRG_N
981 and A.CRT_TS = put(B.OFFRG_TM_CRT_TS,datetime26.)
NOTE: Remote submit to MYNODE complete.