/* create a view that merges all the ustabs* tables together */ libname data '/pub/data/acs2007/basetbls'; %let period=3yr; proc sql; drop view basetables. create view data.basetables&period as select a.*, b.*, c.*, d.*, e.*, f.* from ustabs00_07&period a, ustabs08&period b, ustabs09_16&period c, ustabs17_20&period d, ustabs21_24&period e, ustabs25_26&period f where a.geoid=b.geoid and a.geoid=c.geoid and a.geoid=d.geoid and a.geoid=e.geoid and a.geoid=f.geoid; quit;