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)
Registration is open! SAS is returning to Vegas for an AI and analytics experience like no other! Whether you're an executive, manager, end user or SAS partner, SAS Innovate is designed for everyone on your team. Register for just $495 by 12/31/2023.
If you are interested in speaking, there is still time to submit a session idea. More details are posted on the website.
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.