I get the above error message (Error: Expression using equals (=) has components that are of different data types) upon running the following code:
create table disease_standard as
select year, age_group, sex, disease
where disease=1 and year=.
I'm not sure what the error message means, and how to go about fixing it. Any help?
You miss semicolons on all lines executing the macro. It should be:
%eventsum(period=2013); %eventsum(period=2014); %eventsum(period=2015); %eventsum(period=2016); %eventsum(period=2017);
Alternatively, if have semicolons and this is just typo on post,
then probably PERIOD is defined as charcter and you have to code execution like:
%eventsum(period='2013'); %eventsum(period='2014'); %eventsum(period='2015'); %eventsum(period='2016'); %eventsum(period='2017');
Check your variable types for the two variables in your WHERE clause. If either are character they require quotes around the values.
where disease='1' and year=&period
where disease=1 and year="&period"
Or possibly both combined.
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.