Hi All, I would like use "proc sql" in SAS to merge two Excel documents data First, I import data from Excel to SAS Two names in SAS are Ipo & Calendar. Then, I hope to merge according to Ipo - Date I & Calendar - Date L (Document Name - Variable) I code as below: But it doesn't work proc sql;
create table merge1
as select * from Ipo, Calendar
where Ipo. Date I= Calendar. Date L
order by Date I;
quit; Besides, In Ipo document's variable, there are two or more same Date-I variables, I hope to merge and keep all of it in "merge1". For example: In Ipo document: Date I xx, xx, xxxxxxx 2005/3/22, 4, -6.54%, ................................. 2005/3/22, 5, -23.71%, ................................ 2005/3/22, 6, -5.71%, .............................. In Calendar document: Date L xx, xx, xxxxxx 2005/3/22, 1, 1, 1, .................... Hope to In merge1, Date I xx, xx, xxxxxx xx, xx, xxxxxx 2005/3/22, 4, -6.54%, .......................... 1, 1, 1, .................... 2005/3/22, 5, -23.71%, .......................... 1, 1, 1, .................... 2005/3/22, 6, -5.71%, ............................ 1, 1, 1, .................... How do I code? Please see the attachments as the reference (Excel Raw Data) Many Thanks!!
... View more