in reply to Re^3: Pulling a blank SQL row, but there are no blank rows.
in thread Pulling a blank SQL row, but there are no blank rows.

I wasn't aware of that behaviour, and it seems to be undocumented. At least, in the SQL Server 2000 documentation of the rand() function, there is no trace of a document describing this behaviour. Unfortunately, I currently don't have access to any SQL Server installation.

If the SQL Server really behaves that brainf*ed (and I have no problem to believe that), using rand() would not help. But I don't think that newid() gives sufficiently random output. It seems to return a UUID, which can be constructed from a machine-specific constant and the local time, at least in v1 and v2. v3 and v5 are hash functions, only v4 is really random. Again, I could not find a document stating how newid() is implemented.

Alexander

--
Today I will gladly share my knowledge and experience, for there are no sweeter words than "I told you so". ;-)
  • Comment on Re^4: Pulling a blank SQL row, but there are no blank rows.