Random Number on SQL without using NewID()
Is it overflowing?
CAST(CHECKSUM(NEWID()) AS bigint) * CAST(100000 AS bigint) AS [ITEM]
CAST(CAST(CHECKSUM(NEWID()) AS bigint) * CAST(100000 AS bigint) % 2100000000 AS int) AS [ITEM]
Edit:
There is no such thing as 0% chance of duplicated number
CHECKSUM(NEWID())) returns an integer, which has 4 billion rows. The birthday paradox means the chance of collision is much higher of course.
Bigint (above) or decimal(38,0) give you a lot more room to play with but only reduce the chance of collision but never eliminate.
But still don't get why you're trying to JOIN in a unique randomnumber...