Solved

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

Posted on 2011-02-17
3
993 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

How to run any project with ease

Manage projects of all sizes how you want. Great for personal to-do lists, project milestones, team priorities and launch plans.
- Combine task lists, docs, spreadsheets, and chat in one
- View and edit from mobile/offline
- Cut down on emails

Join & Write a Comment

Suggested Solutions

Title # Comments Views Activity
Dropbox 3 54
Free runner service software 2 50
Dentrix G4 1 31
How To Choose The Right "Big Data" Certification 5 70
Read about achieving the basic levels of HRIS security in the workplace.
Workplace bullying has increased with the use of email and social media. Retain evidence of this with email archiving to protect your employees.
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.
Video by: Tony
This video teaches viewers how to export a project from Adobe Premiere Pro and the various file types involved.

758 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

22 Experts available now in Live!

Get 1:1 Help Now