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

Can someone please explain this a little further? Is there a greater than symbol in a? 

 

Which of the following does not have proper syntax for specifying a range in the VALUE statement?

 

 a.  500>-700
 b.  500-<700
 c.  'A'-'C'
 d.  'Horse'-'Mouse'


Your answer: b
Correct answer: a


The greater than symbol is not valid for a range. The less than symbol can be used after the starting value or before the ending value.

1 ACCEPTED SOLUTION
3 REPLIES 3
ed_sas_member
Meteorite | Level 14

Hi @mintbit 

 

By default, a simple hyphen (-) means that boundaries are included.

To exclude them, you can use the inferior sign: <

  • 500>-700 is not a proper syntax
  • 500-700 is equivalent to [500;700]
  • 500-<700 is equivalent to [500;700[ 
  • 500<-700 is equivalent to ]500;700] 
  • 500<-<700 is equivalent to ]500;700[

Best,

mintbit
Obsidian | Level 7

Thank you for the reply. It is much clearer now. My question seems so stupid now that I understand the answer 😅

sas-innovate-white.png

Missed SAS Innovate in Orlando?

Catch the best of SAS Innovate 2025 — anytime, anywhere. Stream powerful keynotes, real-world demos, and game-changing insights from the world’s leading data and AI minds.

 

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.

SAS Training: Just a Click Away

 Ready to level-up your skills? Choose your own adventure.

Browse our catalog!

Discussion stats
  • 3 replies
  • 1243 views
  • 2 likes
  • 3 in conversation