79698039

Date: 2025-07-11 08:32:03
Score: 2
Natty:
Report link

When I used RAND() with Synapse on a serverless pool I got the same value from RAND() on every row. My workaround for this was to use the ROW_NUMBER() as the seed for RAND(). This gave the RAND() call on each row a different seed and it definitely generated different numbers. When I used to result to partition a dataset into an 80%/10%/10% split all the partitions came out the right size, so I hope it is random enough.

SELECT RAND(ROW_NUMBER() OVER())

Reasons:
  • No code block (0.5):
  • Starts with a question (0.5): When I use
  • Low reputation (1):
Posted by: T L