ksharp is probably right, but I think this might work as well (I am not quite sure why you're changing the variable type though): Proc SQL; Create Table file_combines As Select A.*, B.Company_Price From (Select Date Format=DDMMYY10., Put(Company_number,6.) As C_Nr Format=$6. Length=6 From File1) As A Left Join (Select Date Format=DDMMYY10., Put(Company_number,6.) As C_Nr Format=$6. Length=6, Company_price From File2) As B On A.Date eq B.Date AND A.C_Nr eq B.C_Nr Order By C_Nr, Date; Quit;
... View more