As suggested i put end date for over_ride table1 Product st_date End_date Price A 01-Jan-18 15-Jan-18 10 B 09-Feb-18 14-Feb-18 20 C 06-May-18 11-May-18 30 D 11-Jun-18 16-Jun-18 15 table2 Product Override_date End_date Price A 03-Jan-18 15-Jan-18 12 A 10-Jan-18 15-Jan-18 11 A 11-Jan-18 15-Jan-18 12 A 13-Jan-18 15-Jan-18 9 A 14-Jan-18 15-Jan-18 5 B 09-Feb-18 14-Feb-18 18 D 17-Jun-18 16-Jun-18 23 i run the macro %FletrensInterval(work.table1, work.table2, work.want, unita=Product, datefirsta=St_date, datelasta=End_date, unitb=Product, datefirstb=Override_date, datelastb=End_date, join=left); showing following error: 24 proc datasets lib=&lib nolist; delete &ds; quit; 24 ! %rensinterval(&tablea,qzbtableft0,datefirst=&datefirsta,datelast=&datelasta); _ 180 24 ! %rensinterval(&tableb,qzbtabright0,datefirst=&datefirstb,datelast=&datelastb); * sortering afhængig om byvars ERROR 180-322: Statement is not valid or it is used out of proper order. WARNING: Apparent invocation of macro RENSINTERVAL not resolved. WARNING: Apparent invocation of macro RENSINTERVAL not resolved. 24 proc datasets lib=&lib nolist; delete &ds; quit; 24 ! %rensinterval(&tablea,qzbtableft0,datefirst=&datefirsta,datelast=&datelasta); 24 ! %rensinterval(&tableb,qzbtabright0,datefirst=&datefirstb,datelast=&datelastb); * sortering afhængig om byvars _ 180 ERROR 180-322: Statement is not valid or it is used out of proper order.
... View more