Your SITEID variable is character.
The code you generated was
where &myVar in (002 003);
Which is trying to look for a character value in a list of numeric values.
To make string literals add quotes.
Best to use single quotes so that macro triggers in the values of SITEID are not acted on by the macro processor.
Note that trailing spaces are not meaningful in comparisons, but would make the text put into the macro variable longer, so remove those.
select distinct quote(trim(SITEID),"'")
into :SITES separated by ' '
from DB
;
... View more