vzurkowski (6/9/2009)
To "chose at random from 1,..,5" usually means to chose from 1,..,5 in such a way that any outcome has the same probability of being selected.Assuming T-SQL RAND() has good statistical properties (if someone knows of tests, please let me know), why would RAND(CHECKSUM(NEWID()) have good properties? (i.e.: why would it select a number uniformly distributed between 0 and 1 ?)
Why wouldn't it? You're giving it a random seed.
--Jeff Moden
Change is inevitable... Change for the better is not.