Please help on sas basic error

I am a beinner in sas and data feild and have just started using these tools and techniques…so seek some help.
This is a sample code that i am using but it is showing some error …

data datefilter;
set formatteddata;
where vehicle_type =‘Passenger’ and Latest_Launch<"01-oct-14"d;
run;

ERROR IS:

1 OPTIONS NONOTES NOSTIMER NOSOURCE NOSYNTAXCHECK;
61
62 data datefilter;
63 set formatteddata;
64 where vehicle_type =‘Passenger’ and Latest_Launch<"01-oct-14"d;
ERROR: WHERE clause operator requires compatible variables.
65 run;

NOTE: The SAS System stopped processing this step because of errors.
WARNING: The data set WORK.DATEFILTER may be incomplete. When this step was stopped there were 0 observations and 15 variables.
WARNING: Data set WORK.DATEFILTER was not replaced because this step was stopped.

CAn some one help.

1 Like

@vipul,

Not so proficient with SAS but can you try "01OCT2015"d?

Problem is the difference in format of variable latest_launch, Please confirm the format.

Thanks Aayush,

I have tried this solution but not working… and then i looked for the error in format and chaged the format as well… still not able to get the correctly filtered data. …confused :stuck_out_tongue:

Hi Rishabh,

I have done that and played with foemating as well as informating of the data but it is still not filtering the data correctly…

I think i should start with a new data set …

Hi,

Please make changes in the date format as provided in this code.
It’ll work fine.

data datefilter;
set formatteddata;
where vehicle_type =‘Passenger’ and Latest_Launch<"01oct14"d;
run;

Regards,
Chirag