I have a query I want to run through SAS in Proc SQL where I am getting data from one of our company databases. At the top of the query, for ease of use mostly, I want to be able to put a list of input variables. I am interested in getting data only in certain dates and certain states. The dates I care about are contiguous so I just make a SAS macro variable for the start date and end date and use a between statement. That's easy enough. But, for the states, I can't do such a thing. So, my thought was to do something like
%LET States = ('CT', 'MD', 'ME', 'NC', 'WV');
and then later on, I want to do a where statement
WHERE (State_Tp IN &States)
Now, this does not work. And, I've tried several other variations but I can't seem to get it to work. Is something like this possible?