BookmarkSubscribeRSS Feed
gloriarhyne
Calcite | Level 5

Hi,

 

 I am working in a previously made SAS code that integrates redcap datasets. 

 

I am trying to filter out a certain answer (essentially trying to filter out variables of people who had completed the full timeline of a study vs all others who did not for various reasons for a report) to make it easier when it auto regerates into an Excel spreadsheet for a report. 

 

I've tried doing some simple WHERE commands, some IF commands, etc. (like "WHERE endstatus=0 endreason=0"; run; and changing it to "WHERE endstatus=1,2,3,4 endreason=1,2,3,4"; run;) but it keeps bringing up the variables of "0" which is the complete variable. 

 

Any ideas? Thanks in advance. 

2 REPLIES 2
Reeza
Super User
Your syntax is incorrect - the log should be telling you that as well?
Something like this may work instead:

WHERE endstatus in (1,2,3,4) and endreason in (1,2,3,4);
AMSAS
SAS Super FREQ

Go read the WHERE statement documentation, there are several examples that will help explain the syntax