Hi:
You should be seeing something like this ERROR message in the log:
[pre]
ERROR: Expression using IN has components that are of different
data types.
[/pre]
But, for purposes of WHERE, you can use the PUT function to convert the compared value to character for the duration of the comparison. See the program log below.
cynthia
[pre]
9331 ods listing;
9332 proc sql;
9333 title 'bad sql where';
9334 select *
9335 from sashelp.class
9336 where age in ('11','12','13')
9337 order by age;
ERROR: Expression using IN has components that are of different
data types.
NOTE: The IN referred to may have been transformed from an OR
to an IN at some point during PROC SQL WHERE clause
optimization.
9338 quit;
NOTE: The SAS System stopped processing this step because of
errors.
NOTE: PROCEDURE SQL used (Total process time):
real time 0.00 seconds
cpu time 0.00 seconds
9339
9340
9341 proc sql;
9342 title 'good sql where';
9343 select *
9344 from sashelp.class
9345 where put(age,2.0) in ('11','12','13')
9346 order by age;
9347 quit;
NOTE: PROCEDURE SQL used (Total process time):
real time 0.10 seconds
cpu time 0.01 seconds
[/pre]