11-03-2017 06:43 PM
hello I have my query below
What I'm trying to do is use the asmt_tmplt_id and restrict the data so that it only takes these 4 ids, I get the error below when I try, is it just the wrong type of statement I'm doing?
proc sort data=lib.fall_assessments out=tmp3 nodupkey ;
where BLD_ASMT_ID in ('461') ;
by MBR_ID ARC_QUEST_ID RSPN_CHO_ID ;
proc sort data=tmp3 nodupkey ;
where ASMT_TMPLT_ID in ('6746','6953','7086','7173');
by MBR_ID ARC_QUEST_ID ;
proc transpose data=tmp3 out=tmp3 ;
by MBR_ID ;
id ARC_QUEST_ID ;
var RSPN_CHO_ID ;
NOTE: There were 4468 observations read from the data set LIB.FALL_ASSESSMENTS.
NOTE: 106 observations with duplicate key values were deleted.
9 The SAS System 15:52 Friday, November 3, 2017
NOTE: The data set WORK.TMP3 has 4362 observations and 12 variables.
NOTE: PROCEDURE SORT used (Total process time):
real time 0.05 seconds
cpu time 0.03 seconds
33 proc sort data=tmp3 nodupkey ;
34 where ASMT_TMPLT_ID in ('6746','6953','7086','7173');
ERROR: WHERE clause operator requires compatible variables.
35 by MBR_ID ARC_QUEST_ID ;