Solved

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

Posted on 2011-02-17
3
1,004 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 41

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 41

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

Microsoft Certification Exam 74-409

Veeam® is happy to provide the Microsoft community with a study guide prepared by MVP and MCT, Orin Thomas. This guide will take you through each of the exam objectives, helping you to prepare for and pass the examination.

Question has a verified solution.

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

As technology users and professionals, we’re always learning. Our universal interest in advancing our knowledge of the trade is unmatched by most industries. It’s a curiosity that makes sense, given the climate of change. Within that, there lies a…
When it comes to protecting Oracle Database servers and systems, there are a ton of myths out there. Here are the most common.
The viewer will learn common shortcuts with easy ways to remember them. The viewer will then learn where to find all of the keyboard shortcuts, how to create/change them, and how to speed up their workflow.
This video shows how use content aware, what it’s used for, and when to use it over other tools.

733 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