Hello, I want to generate a unique random number with the following statement:
Convert(int, (CHECKSUM(NEWID()))*100000) AS [ITEM]
The reason when I use joins clauses on "from" generates double registers using NEWID ()
Im using SQL Server 2000
* PD: When I use Rand (), it probably repeats the probability of 1 100000000, but it is so critical, therefore, to repeat the generated random value
there should be a 0% probabilityMy query with NewID () and the result in the SELECT statement is duplicated (x2) My query without newID () and the use of RAND () in the SELECT statement is one (x1), but the probability of the generated random value being repeated is undefined, but exists!
Thank!
source
share