Trending
Polio, other vaccines reach 23m Nigerian children in six months is trending now Sleeping with earbuds may trigger hearing loss, say ENT specialists is trending now Eating for two unhealthy, not recommended during pregnancy — Gynaecologists is trending now AI uncovers hidden Ozempic side effects across 400,000 Reddit posts is trending now Physicists discover a hidden “curveball” in quantum light is trending now With a Better Understanding of Physics, We Could Predict Volcanic Eruptions is trending now Carrick, Maresca Chasing History as Red Devils, Citizens Clash is trending now U.S. women reach FIBA World Cup final is trending now Mbappé leads Real Madrid to victory with a two-goal performance is trending now Lionel Messi closes in on the magical milestone of 100 goals for Inter Miami is trending now Sharon Ooja Opens Up on Movie Role That Left Her Emotionally Drained: "It Was a Lot of Wo… is trending now Wumi Toriola’s outfit to colleague’s birthday party draws criticism is trending now Polio, other vaccines reach 23m Nigerian children in six months is trending now Sleeping with earbuds may trigger hearing loss, say ENT specialists is trending now Eating for two unhealthy, not recommended during pregnancy — Gynaecologists is trending now AI uncovers hidden Ozempic side effects across 400,000 Reddit posts is trending now Physicists discover a hidden “curveball” in quantum light is trending now With a Better Understanding of Physics, We Could Predict Volcanic Eruptions is trending now Carrick, Maresca Chasing History as Red Devils, Citizens Clash is trending now U.S. women reach FIBA World Cup final is trending now Mbappé leads Real Madrid to victory with a two-goal performance is trending now Lionel Messi closes in on the magical milestone of 100 goals for Inter Miami is trending now Sharon Ooja Opens Up on Movie Role That Left Her Emotionally Drained: "It Was a Lot of Wo… is trending now Wumi Toriola’s outfit to colleague’s birthday party draws criticism is trending now
Qualcomm

Loading a 1% Random Sample

Loading a 1% Random Sample

I needed to load a one percent random sample of a large file last week. I’m sure others have figured out this method but this was the first time I coded it like this: MYSAMPLE: Load * from MYFILE.qvd (qvd) Where Rand()<=0.01; The Rand function returns a random value between 0 and 1. In the load statement above it would only be true 1% of the time (approximately) -- that would load only 1% of the rows. If it was coded as Where Rand()<=0.20 then it would be a 20% random sample, etc. This method can be used with almost any Load statement even one of the steps in a preceding load.  Note that we're talking about random numbers here so the total number of rows loaded using this technique will not be exactly 1% of the total rows in the file, although it will be close especially when the total number of rows in the file is very large. Be aware too that the rows that get loaded will not be an evenly distributed sample of rows although it will be close.   ★★★

View original source →

Related