What are the challenges you face when working across database platforms? Take the survey

Weigthed list generator - maximum weight

Hi all,

I'm trying to use SQL Data Generator (version to generate extra data for the FactResellerSales table in the AdventureWorksDW2012 sample database. But in order to make it match the pattern of the rest, I find that some features are missing from Data Generator.

One of them is for generating the RevisionNumber. In the existing data, this number is typically 1 (about 99.9%), and sometimes 2 (about 0.1%). I wanted to expand a bit on that, by adding an even smaller number (0.001%) of 3's. So I used the Weighted list generator, entered the values 1, 2, and 3, and tried to set the weights to 99899, 100, and 1.

To my surprise, the value 99899 was simply changed to 10000. Is this a bug, or is this a design choice?

This is not a big issue to me. I decided to go with the flow and use weights of 10000, 100, and 1 - no biggie. But I am wondering why I am not allowed to use a higher weight?

Thanks in advance! ;)

EDIT: After posting, I realized that there is a workaround for values that are not too far above 10,000 - for instance, to get a weight of 15,000, simply add the same value twice, with weights 10,000 and 5,000. But for really big values, that workaround is not practical.
Hugo Kornelis
(SQL Server MVP, 2006-2016 + 2019-now // Friend of Red Gate)


  • Options
    Thanks for your post.

    I'm not entirely sure why that maximum value is what it is- I guess it's just one of those design-time decisions that never changed.

    We already have a bug logged around some other areas of the weighted list generator, so I've added a note of this forum post to that for reference (SDG-629)
    Systems Software Engineer

    Redgate Software

Sign In or Register to comment.