a quick bump on an old post. i just needed to generate some random strings, and had this saved in my snippets. when i tested it, it didn't work, it returned the same string 100x times, and there's a comment that explicitly says there's an attempt to trick the optimizer.
the "case when Num >= 0 then 8 else 8 end,16," trick mentioned to fool the optimizer does not work on SQL2012 or SQL2014;
Lowell