Hello team,
I have a date variable of numeric data type. I put this variable in a year function to get the year portion of the date.
The result is 2022 as a character. Then I use this 2022 in a single quote in a where clause in a proc sql that groups the data, as soon as I put a.year = '2022', it returns 0 rows back.
proc sql;
create table mytable as
select a,*, b.id, b.event, b.year, b.codetype, count(a.event)
from thattable a inner join thistable b on a.id=b.id
where a.year ='2020' and b.codeType = 'hhhh'
group by a.id, b.id, b.codetype,b.year;
quit;
Regards,
blue & blue
... View more