I have a simple code:
%let YYMMSD = 20160101;
%let YYMMED = 20160131;
proc sql;
select *
from table pol
where pol.date between &yymmsd and &yymmed
and pol.ID not in ('CA')
and pol.risk_state = 'CO';
I get an error "...Expression using equals (=) has components that are of different data types...." on the pol.risk_state line.
I already did a proc contents to make sure my I'm asking for the same format type, so I"m not surethe the issue is.
pol.date is a NUM type, so I'm asking it to get all date between 20160101 and 20160131
pol.ID is a Char type, so I"m asking it for 'CA'.
pol.risk_state is a Char type, and i"m asking for 'CO'.
what's my issue here?
%let YYMMSD = 20160101;
%let YYMMED = 20160131;
proc sql;
select *
from table pol
where pol.date between &yymmsd and &yymmed
and pol.ID not in ('CA')
and pol.risk_state = 'CO';
I get an error "...Expression using equals (=) has components that are of different data types...." on the pol.risk_state line.
I already did a proc contents to make sure my I'm asking for the same format type, so I"m not surethe the issue is.
pol.date is a NUM type, so I'm asking it to get all date between 20160101 and 20160131
pol.ID is a Char type, so I"m asking it for 'CA'.
pol.risk_state is a Char type, and i"m asking for 'CO'.
what's my issue here?