Still dont understand why the following would not work: Proc sql; create table out as select a.companyname, a.monthend, a.marketcap, b.networth from lefttable as a left join righttable as b on a.companyname = b.companyname and year(a.monthend) = b.year ; quit; Unless you are saying the monthend is numeric but not an actually datetime varaible (when not formatted the actual value is 200203 and not something like 15430 ). In this case I believe you could change the on statement to: on a.companyname = b.companyname and int(a.monthend/100) = b.year Hope this helps! EJ
... View more