BookmarkSubscribeRSS Feed
deleted_user
Not applicable
What is the equivalent of "top n" within SAS? I'm having trouble with defining the statement pasted below:

SELECT A.COLUMN1, A.COLUMN2, A.COLUMN3,
(SELECT TOP 1 B.COLUM4 FROM TABLE_B AS B
WHERE A.COLUMN1 = SUBSTR(B.COLUMN1,1,17)) AS XX
FROM TABLE_A AS A

Your help would be much appreciated.
1 REPLY 1
deleted_user
Not applicable
I'm sorry, I think I posted this one within the wrong subforum.
Admin can delete this thread, I posted a new one in the right section.

Thank you.

SAS Innovate 2025: Save the Date

 SAS Innovate 2025 is scheduled for May 6-9 in Orlando, FL. Sign up to be first to learn about the agenda and registration!

Save the date!

SAS Enterprise Guide vs. SAS Studio

What’s the difference between SAS Enterprise Guide and SAS Studio? How are they similar? Just ask SAS’ Danny Modlin.

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
  • 1 reply
  • 743 views
  • 0 likes
  • 1 in conversation