04-05-2018 10:18 PM
I usually like to view a quick 5 to 10 rows of my table so I can actually see the column names, and also get a feel of what sample data looks like.
I always tend to use the following:
proc sql inobs=10; select * from table; quit;
Is this the best way to view a quick sample of my data? From my experience, sometimes inobs=10 can generate a table really quick, and other times, it takes a long time to run.
Maybe I don't quite understand what an "inobs" does, but is this the best way to get a very fast look at my data?
04-05-2018 10:30 PM
It should be fine, I use the equivalent, data step version.
proc print data=have (obs=10) ; run;
It's documented here:
04-06-2018 12:31 AM
As to widely varying times for 10 obs:
If each stock ticker has 10,000 records in the quotes data set, then the first 10 obs in TABLE requires then first 100,000 observations in QUOTES.
data table /view=table; do until(last.ticker); set quotes; by ticker; total_ask_shares=sum(total_ask_shares,ask_shares); total_bid_shares=sum(total_bid_shares,bid_shares); end; run; proc sql inobs=10; select * from table; quit