Desktop productivity for business analysts and programmers

if then query

Accepted Solution Solved
Reply
Super Contributor
Super Contributor
Posts: 331
Accepted Solution

if then query

Hello friends - please help to get this done

i have dataset "a" like this; (lets say all var are character except "var1")

var1            var2      var3     var4

300956       x           a           y

300956       x           a           y

300956       x           a           y

300956       x           a           y

300956       x           a           y

300956       x           b       

300956       x           b

300956       x           b

300956       x           b

i want output like this

var1            var2      var3     var4

300956       x           a           y

300956       x           b       

how can i get this done?

Thank you....


Accepted Solutions
Solution
‎11-01-2014 03:38 AM
Super User
Posts: 9,856

Re: if then query

proc sort data=have out=want nodupkey;by var1-var4;run;

View solution in original post


All Replies
Solution
‎11-01-2014 03:38 AM
Super User
Posts: 9,856

Re: if then query

proc sort data=have out=want nodupkey;by var1-var4;run;

Super Contributor
Super Contributor
Posts: 331

Re: if then query

Thanks Xia it worked...Smiley Happy

🔒 This topic is solved and locked.

Need further help from the community? Please ask a new question.

Discussion stats
  • 2 replies
  • 261 views
  • 0 likes
  • 2 in conversation