Retain Certain Type Among Obs with the same ID

Reply
Regular Contributor
Posts: 194

Retain Certain Type Among Obs with the same ID

Hello!  Any help you can give is appreciated!

I've a document with:

ID                  Type       Duplicate             (other fields, etc...)

12345678      B             1                              

12345676      A             1                               

12345677      A             3                   

12345667      B             3                    

12345654      A             4

12345432      B             4            

How do you select for Type A of each duplicate and include all fields

Final Table

ID                  Type       Duplicate             (other fields, etc...)                        

12345676      A             1                                

12345677      A             3                                    

12345654      A             4

Thanks very much!

Super User
Super User
Posts: 7,039

Re: Retain Certain Type Among Obs with the same ID

I must not understand the question.

Why not just

where type = 'A';

????

Regular Contributor
Posts: 194

Re: Retain Certain Type Among Obs with the same ID

I oversimplified the example. Your response was helpful for me to look at it from a different angle.  Thanks!

Ask a Question
Discussion stats
  • 2 replies
  • 148 views
  • 0 likes
  • 2 in conversation