Random Number on SQL without using NewID()
- by Angel Escobedo
Hello I want to generate a Unique Random number with out using the follow statement :
Convert(int, (CHECKSUM(NEWID()))*100000) AS [ITEM]
Cause when I use joins clauses on "from" it generates double registers by using NEWID()
Im using SQL Server 2000
*PD : When I use Rand() it probably repeat on probability 1 of 100000000 but this is so criticall so it have to be 0% of probability to repeat a random value generated
My Query with NewID() and result on SELECT statement is duplicated (x2)
My QUery without NewID() and using Rand() on SELECT statement is single (x1) but the probability of repeat the random value generated is uncertainly but exists!
Thanks!