September 14, 2009 at 4:17 am
Comments posted to this topic are about the item Quickly Generate Random number by TSQL with 99.9% Uniqueness Guarntee
September 17, 2009 at 8:49 am
I was not able to run the script. I pasted use temdb as first line. I am using SQL Server Management studio 2008 as client and SQL server 2005 as server.
following are the errors that i was getting
Msg 102, Level 15, State 1, Line 10
Incorrect syntax near '?'.
Msg 102, Level 15, State 1, Line 11
Incorrect syntax near '?'.
Msg 102, Level 15, State 1, Line 13
Incorrect syntax near ')'.
Msg 102, Level 15, State 1, Line 17
Incorrect syntax near '?'.
Msg 102, Level 15, State 1, Line 22
Incorrect syntax near '?'.
Msg 208, Level 16, State 1, Line 5
Invalid object name 'tblTest'.
Msg 3701, Level 11, State 5, Line 3
Cannot drop the table 'tblTest', because it does not exist or you do not have permission.
September 17, 2009 at 8:58 am
Very cool. My results were 1080 duplicate numbers, each appearing twice. No number returned 3 times. Out of 3 million, that's 99.96% unique. 🙂
September 24, 2009 at 2:07 pm
I had the same issue.
I copied the code into TextPad and got rid of the leading "spaces" within the CTEs. For example, there are 4 characters at the beginning of the line "Select 1 as n" that aren't really spaces.
:w00t:
September 25, 2009 at 4:34 am
I checked the issue. This is due to some unprintable characters inserted by HTML. To solve this issue, copy the code in notepad first and you wil see the box for unprintable chracters. Just replace all occurances of that character with a space. After this, Copy the code from notepad and paste it in your Query Analyzer window. It will work like a charm.
May 24, 2016 at 6:47 am
Thanks for the script.
Viewing 6 posts - 1 through 5 (of 5 total)
You must be logged in to reply to this topic. Login to reply