2

Can any one please let me know what would be the most efficient way the create "nodupkey" like in mySQL thay would give the same result as SAS code here ?

  Proc sort data=T1 nodupkey out = T2; By ID; Run;

Thanks

JPC
  • 5,063
  • 20
  • 71
  • 100

1 Answers1

1

seems like a simple distinct could be enough for your case, so your MySQL code should look like this:

create table T2 
 select distinct ID
 from T1

More information can be found here

Hope this help

EDIT:

As Mozan say this is supposed to work only if you have a single varible on your table, named ID

Piwakkio
  • 63
  • 1
  • 3
  • 12
  • 1
    This is wrong unless ID is the only variable in your dataset (column in your table). See http://stackoverflow.com/questions/4685173/delete-all-duplicate-rows-except-for-one-in-mysql for a proper answer. – Mozan Sykol Jun 26 '12 at 08:17