Hi, using the command bar to open a dataset:
vt work.new
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?
Thnak you.
In addition to that sturcture:
vt sashelp.class (where=(sex eq 'M'))
maybe you need to state the date as: date eq "01JAN2000"d
This one works for me:
vt sashelp.class (where=(sex eq 'M'))
In addition to that sturcture:
vt sashelp.class (where=(sex eq 'M'))
maybe you need to state the date as: date eq "01JAN2000"d
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.
Thnaks.
Yes, thank you. It works!
Join us for SAS Innovate April 16-19 at the Aria in Las Vegas. Bring the team and save big with our group pricing for a limited time only.
Pre-conference courses and tutorials are filling up fast and are always a sellout. Register today to reserve your seat.
Learn the difference between classical and Bayesian statistical approaches and see a few PROC examples to perform Bayesian analysis in this video.
Find more tutorials on the SAS Users YouTube channel.