(this is a correction to the question I sent yesterday:) my database look like that: file1 Company_number date 111111 31/03/2012 111111 30/06/2012 222222 31/03/2012 222222 30/06/2012 file2 Company_number date company_price . . 111111 .28/03/2012 10 111111 29/03/2012 12 111111 30/03/2012 11 111111 31/03/2012 12 111111 01/04/2012 14 111111 27/06/2012 16 111111 28/06/2012 17 111111 29/06/2012 18 111111 30/06/2012 19 111111 01/07/2012 20 111111 02/07/2012 21 222222 .28/03/2012 30 222222 29/03/2012 33 222222 30/03/2012 35 222222 31/03/2012 33 222222 01/04/2012 32 222222 27/06/2012 34 222222 28/06/2012 35 222222 29/06/2012 36 222222 30/06/2012 37 222222 01/07/2012 38 222222 02/07/2012 39 the combined_file should look like that: Company_number date company_price 111111 31/03/2012 12 111111 30/06/2012 19 222222 31/03/2012 33 222222 30/06/2012 37 meaning I need the joint left to apply two Criteria: date of file1 = date of file2 Company_number of file1 = Company_number of file2. I tried registere it like this proc sql; create table file_combined as select a.*,b.company_price from file1 a left join file2 b on put(a. date, date.) eq put (b.date, date.) and (a.company_number, $6.) eq put (b. company number, $6.) order by company_number, date; quit; run; but with no succeed. any ideas how can I put two Criteria in left_join procedure? thanks, Lior
... View more