Talk:Type Conversions in WHERE Statements

From sasCommunity

Jump to: navigation, search

"This DATA step runs without raising any ERROR conditions, because SAS converts SEX to numeric:

data _null_;
set sashelp.class;
if age ne sex;
run;"

Log results:
1    data _null_;
2    set sashelp.class;
3    if age ne sex;
4    run;

NOTE: Character values have been converted to numeric values at the places given by:
      (Line):(Column).
      3:11
NOTE: Invalid numeric data, Sex='M' , at line 3 column 11.
Name=Alfred Sex=M Age=14 Height=69 Weight=112.5 _ERROR_=1 _N_=1

Lots of NOTEs, but no ERRORs. --Howles 11:07, 8 September 2008 (EDT)

Personal tools