You have a data set of 100 observations,how can you
restrict the output so that the output has only data from
row no. 10 to row no. 20

Answer Posted / amit gupta

SELECT *
FROM (SELECT ROWNUM srno, a.*
FROM emp a)
WHERE srno >= 10 AND srno <= 20

/

SELECT *
FROM (SELECT ROWNUM srno, a.*
FROM emp a)
WHERE srno between 10 and 20

Is This Answer Correct ?    2 Yes 1 No



Post New Answer       View All Answers


Please Help Members By Posting Answers For Below Questions

If you use a symput in a data step, when and where can you use the macro variable? : sas-macro

613


Explain what is data step?

731


How substr function works in sas?

704


Difference between nodup and nodupkey options?

637


How long can a macro variable be? A token? : sas-macro

721






What are the difference between the sas data step and sas procs?

614


in the flow of data step processing, what is the first action in a typical data step? : Sas programming

655


How might you use MOD and INT on numeric to mimic SUBSTR on character Strings?

752


what are the component of range? : Sas-bi

618


What are the data types does SAS contain?

658


What is the role of sas grid administrator? : sas-grid-administration

832


What is substr function?

626


what are the best practices to process the large data sets in sas programming? : Sas-administrator

544


What is interleaving in SAS?

679


how we can create a FLAG datasets? Ex:-ID age_group no_persons 1 to 10 10 to 20 3 11 to 20 21 to 30 7 21 to 3o 31 to 40 5

1664