04-29-2015 11:07 AM
I need to create a random sample of 100K from a billion record dataset. I searched online and learned that I can use raununi (x). But when I ran it in SAS Enterprise guide 5.1, it returned an error message "
CLI describe error: [IBM][CLI Driver][DB2/AIX64] SQL0440N No authorized routine named "RANUNI" of type "FUNCTION" having
compatible arguments was found. SQLSTATE=42884
My codes are like:
create table aa as
where ranuni(5567) between 0.5 and 0.51
Any advice on how to create a random sample using SQL efficiently?
04-29-2015 11:13 AM
If you have the right license for it I would use this:
proc surveyselect data=Customers
strata State Type;
If you must use sql all the info you need should be here:
04-29-2015 11:51 AM
Randuni is a call function, therefore I don't think its available in proc SQL. You can although use the rand() function: