how can get the first and last observations in a dataset
using Proc SQl?
Answer Posted / venkatesh layam
crate one data in sql with adding of new var (a = 1) and
sort(order by) descending order by another variable and
take distinct of a (newvar-which is already created) --then
u wil get last observation.
next do ascending and get first obs ,then union these two
data sets .u will get first and last obs.
| Is This Answer Correct ? | 0 Yes | 0 No |
Post New Answer View All Answers
what are 5 ways to perform a table lookup in sas? : Sas-administrator
how do you debug and test your sas programs? : Sas programming
how the sas basic syntax style described? : Sas-administrator
how are numeric and character missing values represented internally? : Sas programming
Why and when do you use proc sql?
How do dates work in sas?
What would be the result of the following SAS function (given that 31 Dec, 2000 is Sunday)?
How many data types are there in SAS?
What is the length assigned to the target variable by the scan function?
Mention what is PROC in SAS?
describe the interaction table in sas di? : Sas-di
What is the function of Stop statement in a SAS Program?
what are informats in sas? : Sas-administrator
What do you know about sas and what we do? : sas-grid-administration
How can sas program be validated?