02-26-2012 07:42 PM
Hi, using the command bar to open a dataset:
I would like to use the statement where in the commmand bar to search an specific character variable date: 01JAN00 , with format=date7.
I know one way to use where:
using the where stament in the viewtable, selected the variable date EQ and select <lookup distinct values> 01JAN00 and OK...it works perfectly.
But when I type in the command bar: where date=01JAN00, it does not work, apearing the next error:
syntax error while parsing Where clause.
Anyone can help me with the right syntax for the option where in the command bar?
02-26-2012 08:07 PM
It is right when the format is $x, and i am agree it works perfectly.
But,it is not right when you are seeking a date (it has different format) ...sas show an error saying "where clause operator requires compatible variable.
I think is something related with the format date7.
I am using the dataset sashelp.gngsm2 if you want to try.
Need further help from the community? Please ask a new question.