I woul like to clarify some points: - is the look_up table named work.datekey ? - is the date you want to check is on that work.datekey table and is named DATE ? - is the transaction table named as work.payments ? Now back to my oroginal proposed code - addapted to the above: proc sql; create table want as select a.*, b.* /* change to selet desired variables, the asterisk (*) is to select all variables */ from work.DateKey (where=(date='03JAN2016'd)) as a left join work.payments as b on (a.date_key = b.datekey) ; quit; In case it does not meet your expectations please clarify where and why ? The error you got: ERROR: Column Date could not be found in the table/view identified with the correlation name B. is because the DATE variable is not in work.payments table (as B) but in work.DateKey table (as A) Don't hesitate to ask more if need.
... View more