Hello,
when I run the program below there is no error in the log but the variable EPU is empty "."
proc sql;
create table test1 as
select Distinct R.*, B.EPU
from test as R
left join EPU_Data as B on R.sas_date=B.sas_date
order by R.Secid, R.sas_date;
quit;
Maybe you imported the dates from somewhere where they are not represented quite the same as in SAS (e.g. Excel)? Happened to me once. The date numbers were not integers. Try:
left join EPU_Data as B on round(R.sas_date) = round(B.sas_date)
This happens because one (or both) of the following is true:
@sasphd wrote:
I have the same data format for sas_date variable and EPU is not missing there is a number for each data?
Not the format ... the actual values of SAS_DATE don't match.
Run this:
data test1,
merge
test (in=t)
epu_data (
in=e
keep=sas_date epu
)
;
by sas_date,
if t and e;
run;
and then post the complete log (code and messages) from this step.
Maybe you imported the dates from somewhere where they are not represented quite the same as in SAS (e.g. Excel)? Happened to me once. The date numbers were not integers. Try:
left join EPU_Data as B on round(R.sas_date) = round(B.sas_date)
SAS Innovate 2025 is scheduled for May 6-9 in Orlando, FL. Sign up to be first to learn about the agenda and registration!
Learn the difference between classical and Bayesian statistical approaches and see a few PROC examples to perform Bayesian analysis in this video.
Find more tutorials on the SAS Users YouTube channel.
Ready to level-up your skills? Choose your own adventure.