20 proc print data=work.sales;
21 where sales GT 20000;
ERROR: WHERE clause operator requires compatible variables.
NOTE: The SAS System stopped processing this step because of errors.
NOTE: PROCEDURE PRINT used (Total process time):
real time 0.01 seconds
cpu time 0.00 seconds
Using the character variable sales as a numeric variable in the WHERE statement results in a syntax error that will stop the processing of the step. Unlike many other situations in SAS, in WHERE conditions there is no automatic character-to-numeric or numeric-to-character conversion. Technically GT will work on character data (thus C is not correct):
The one and only FREE resource for general SAS online training as well as study guides for the SAS Base Certification. My goal is to create the SAS Certification prep guide that I never found but always wanted. This should also be a place to come if you are new to the language but are simply looking for online SAS training.