b******o 发帖数: 545 | 1 for instance I have a data file as
name gender age income county
jason M 26 40K MORRIS
ADAM M 21 100K CLIFF
JORGE M 30 20K WARREN
ERIKA F 21 43K CLIFF
if I want to delete all the cliff county results,
the " if county = 'cliff' then delete;" doesn't work,
even after I define a string ='cliff', then "if county=string then
delete", still not working.
any suggestion?
Thank you! |
D******n 发帖数: 2836 | 2 case
【在 b******o 的大作中提到】 : for instance I have a data file as : name gender age income county : jason M 26 40K MORRIS : ADAM M 21 100K CLIFF : JORGE M 30 20K WARREN : ERIKA F 21 43K CLIFF : if I want to delete all the cliff county results, : the " if county = 'cliff' then delete;" doesn't work, : even after I define a string ='cliff', then "if county=string then : delete", still not working.
|
b******o 发帖数: 545 | 3 detail please. I am sure it wasn't about the up/low case problem
【在 D******n 的大作中提到】 : case
|
b*******g 发帖数: 513 | 4 You are correct, this program works:
data one;
input name $ gender $ age income $ county $;
datalines;
name gender age income county
jason M 26 40K MORRIS
ADAM M 21 100K CLIFF
JORGE M 30 20K WARREN
ERIKA F 21 43K CLIFF
;run;
data two;
set one;
if county="CLIFF" then delete;
run;
proc print data=two;
quit;
【在 D******n 的大作中提到】 : case
|
b******o 发帖数: 545 | 5 thank you!
【在 b*******g 的大作中提到】 : You are correct, this program works: : data one; : input name $ gender $ age income $ county $; : datalines; : name gender age income county : jason M 26 40K MORRIS : ADAM M 21 100K CLIFF : JORGE M 30 20K WARREN : ERIKA F 21 43K CLIFF : ;run;
|