BookmarkSubscribeRSS Feed
HeatherNewton
Quartz | Level 8

is distinct in proc sql same usage as distinct of SQL?

 

in SQL,

eg select distinct apple orange banana from fruits

mean each row consist of apple orange banana is distinct..

 

in SAS,

proc sql distinct apple orange banana from fruits...

 

is the meaning of distinct the same in both cases? 

 

2 REPLIES 2
AMSAS
SAS Super FREQ

I'm not sure your definition of DISTINCT is the same as my definition, based on your example

 

Here's the link to the documentation 
Select Clause, DISTINCT Argument 

ballardw
Super User

@HeatherNewton wrote:

is distinct in proc sql same usage as distinct of SQL?

 

in SQL,

eg select distinct apple orange banana from fruits

mean each row consist of apple orange banana is distinct..

 

in SAS,

proc sql distinct apple orange banana from fruits...

 

is the meaning of distinct the same in both cases? 

 


Whose "SQL" in the first example. Some implementations of SQL may do things differently based on the rest of the query such as Where, Having or Group by clause and the exact options used in those as well.

 

Many flavors of SQL have extensions to the 'standard' behavior and may be controlled by user settings in addition to the code shown.

 

Better would be to provide some example data AND complete query examples. Best would be create data in the two, or more systems, that is identical and actually run the query and observe the result.

sas-innovate-2024.png

Available on demand!

Missed SAS Innovate Las Vegas? Watch all the action for free! View the keynotes, general sessions and 22 breakouts on demand.

 

Register now!

How to Concatenate Values

Learn how use the CAT functions in SAS to join values from multiple variables into a single value.

Find more tutorials on the SAS Users YouTube channel.

Click image to register for webinarClick image to register for webinar

Classroom Training Available!

Select SAS Training centers are offering in-person courses. View upcoming courses for:

View all other training opportunities.

Discussion stats
  • 2 replies
  • 346 views
  • 0 likes
  • 3 in conversation