Quantcast
Channel: Teradata Forums - Database
Viewing all articles
Browse latest Browse all 14773

Getting a dynamic Sample - response (1) by dnoeth

$
0
0
Is the number of COMMUNICATION_IDs known and small: SAMPLE WHEN COMMUNICATION_ID = x1 THEN 0.1 WHEN COMMUNICATION_ID = x2 THEN 0.1 WHEN COMMUNICATION_ID = x3 THEN 0.1 WHEN COMMUNICATION_ID = x4 THEN 0.1 ELSE 0.1 ENDThis could be created dynamically based on the actual data, but i don't know if there's a limit for the number of WHENs. Or use "WHERE RANDOM(1,10) = 1", but this is not exactly 10% and might miss an id with a small number of rows (this will also happen with SAMLPE when the number of rows is less than 5). What do you mean by "set MIN and MAX"? Dieter  

Viewing all articles
Browse latest Browse all 14773

Trending Articles



<script src="https://jsc.adskeeper.com/r/s/rssing.com.1596347.js" async> </script>