BookmarkSubscribeRSS Feed
🔒 This topic is solved and locked. Need further help from the community? Please sign in and ask a new question.
GenDemo
Quartz | Level 8

Hi All

 

I am wondering if anyone knows why I sometimes get the following note when using the "<>" ('unequal') operator in a data step procedure:

NOTE: The "<>" operator is interpreted as "MAX".

 

Sometimes this happens in a proc sql as well...

1 ACCEPTED SOLUTION
4 REPLIES 4
GenDemo
Quartz | Level 8

Ah Thank you

 

This basically explains it:   Note: In a WHERE statement or clause, the <> operator is equivalent to NE. 

 

 

Reeza
Super User

In a data step, <> is the max function.

In SQL it is Not Equals.

 

In most languages <> means not equals, so SAS warns you otherwise. I would use a max function to avoid the message. 

ballardw
Super User

Things like this are one reason I use the GE LE and NE instead of >= or <= or <>, different possible interprtations and having to remember is it >= or =>.

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
  • 4 replies
  • 12793 views
  • 2 likes
  • 4 in conversation