Desktop productivity for business analysts and programmers

Please help: how to fetch top 1 value within select statement

Reply
N/A
Posts: 0

Please help: how to fetch top 1 value within select statement

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.
N/A
Posts: 0

Re: Please help: how to fetch top 1 value within select statement

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.
Ask a Question
Discussion stats
  • 1 reply
  • 80 views
  • 0 likes
  • 1 in conversation