Solved

Selecting Distinct ID's from a SAS Dataset using PROC SQL

Posted on 2011-02-17
3
995 Views
Last Modified: 2012-05-11
I have a SAS dataset that has mutiple entries for an ID.  Using PROC SQL how can I select each member only one time to create a new dataset?
0
Comment
Question by:morinia
  • 2
3 Comments
 
LVL 40

Accepted Solution

by:
Sharath earned 250 total points
ID: 34918012
try this.
PROC SQL;
SELECT DISTINCT ID FROM Your_Table;
QUIT;

Open in new window

0
 

Author Comment

by:morinia
ID: 34918153
Sharath 123:

The above code works fine.  However, I do have a question if there are other fields that I would like to include that are different but I only want to print the provider one time, what would be the best approach to do this?
0
 
LVL 40

Assisted Solution

by:Sharath
Sharath earned 250 total points
ID: 34918214
If the other columns are not distinct, you will be ended up having duplicate IDs for other columns. How do you want to display result in such cases?
0

Featured Post

Is Your Active Directory as Secure as You Think?

More than 75% of all records are compromised because of the loss or theft of a privileged credential. Experts have been exploring Active Directory infrastructure to identify key threats and establish best practices for keeping data safe. Attend this month’s webinar to learn more.

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

Suggested Solutions

Healthcare organizations in the United States must adhere to the guidance of both the HIPAA (Health Insurance Portability and Accountability Act) and HITECH (Health Information Technology for Economic and Clinical Health Act) for securing and protec…
This guide will walk you through the essential considerations and tech stack for building scalable websites. Know how to grow your business the smart way!
Viewers will learn how to use the Hootsuite Dashboard.
The viewer will learn how to successfully download and install the SARDU utility on Windows 8, without downloading adware.

939 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question

Need Help in Real-Time?

Connect with top rated Experts

6 Experts available now in Live!

Get 1:1 Help Now