I am trying to join two tables together via proc SQL in which have some identical columns (same name & same type) and some unique columns. I know there is a way to do this is regular SQL, I believed it was natural join, but I can't seem to run it without errors in SAS. Does anyone know the proper method for doing this via Proc sql ? This is my current code: proc sql; create table U2_Deposits_Merged_Nov_Feb as select month_end, ID, SubProductCode, OpenDate, DateClosed, Nov_Balance, Feb_Balance, Over_250k_CountNov, Under_250k_CountNov, Nov_Total, Over_250k_CountFeb, Under_250k_CountFeb, Feb_Total, OpenedSinceNov, (Nov_Total - Feb_Total + OpenedSinceNov) as Accounts_Closed from runoff.U2_Deposits_November natural join runoff.U2_Deposits_February on U2_Deposits_November.ID = U2_Deposits_February.ID; quit; (month_end, ID, productcode, opendate, dateclosed are common to both tables, and I would like them to be just be appended in the joined table, and the others are unique to each, those ending in 'Nov' belong solely to the November table, and those ending in 'Feb' belong only to the february table.) Thank you so much!
... View more