Solved

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

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

Netscaler Common Configuration How To guides

If you use NetScaler you will want to see these guides. The NetScaler How To Guides show administrators how to get NetScaler up and configured by providing instructions for common scenarios and some not so common ones.

Question has a verified solution.

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

Suggested Solutions

Title # Comments Views Activity
Free HD cloner 11 84
Exchange 2013 free and busy between mailbox databases 77 161
error in my cursor 5 41
Display SQL 2008 last modified/update Database 11 16
A list of useful business intelligence software.
In our personal lives, we have well-designed consumer apps to delight us and make even the most complex transactions simple. Many enterprise applications, however, are a bit behind the times. For an enterprise app to be successful in today's tech wo…
Video by: Steve
Using examples as well as descriptions, step through each of the common simple join types, explaining differences in syntax, differences in expected outputs and showing how the queries run along with the actual outputs based upon a simple set of dem…
The viewer will learn how to successfully download and install the SARDU utility on Windows 7, without downloading adware.

861 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