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...
The "<>" operator doesn't have the same meaning everywhere
See
The "<>" operator doesn't have the same meaning everywhere
See
Ah Thank you
This basically explains it: Note: In a WHERE statement or clause, the <> operator is equivalent to NE.
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.
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 =>.
Are you ready for the spotlight? We're accepting content ideas for SAS Innovate 2025 to be held May 6-9 in Orlando, FL. The call is open until September 25. Read more here about why you should contribute and what is in it for you!
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.