02-24-2015 04:16 PM
I am trying to read two variables from my access database and then do SQL. But there are three variable in my database: personID, country and city. I only need to read two variables personID and city. How SAS only read the first and third column?
data PersonDS3 ;
Infile Person3 missover firstobs=2;
Input PersonID City & $25. ;
Create table Most_PersonID AS
SELECT city Count(PersonID)AS CountOfPersonID
GROUP BY city;
Proc sort data=Most_PersonID; by Descending CountOfPersonID;
02-24-2015 06:42 PM
Why are you using infile to read from an Access DB?
I would assume you're using ODBC or some other method that would allow you to DROP the variable on the set statement.
set accessDB (drop=unwanted_var);