karthikeya_ivb
03-20-2009, 12:57 AM
hi all,
does any one have an idea about using of the keyword "LIMIT" in proc sql. this keyword can be used in mysql queries. can we use the same here?
-Karthik
vinux
03-22-2009, 09:12 AM
hi all,
does any one have an idea about using of the keyword "LIMIT" in proc sql. this keyword can be used in mysql queries. can we use the same here?
-Karthik
Nope, keyword LIMIT is not a part of proc sql.
It may work in pass through SQL(using connection and running the queries directly with a database)
karthikeya_ivb
03-31-2009, 01:56 AM
Is there any equivalent key word to "limit" in proc sql?
-Karthik
vinux
03-31-2009, 05:05 AM
have you tried the options INOBS, OUTOBS?
karthikeya_ivb
04-01-2009, 01:56 AM
hi
i have tried outobs and it restricts the number of observations.
i found another way to limit the observations: using the function "monotonic"
proc sql;
select *,monotonic() as recno from table_old having recno<11;
quit;
the above code gives only first 10 observations.
-Karthik