Uniqueness for compound keys

cb66cb66 Posts: 5
edited March 20, 2017 8:08AM in SQL Data Generator
Hello,

sorry if this is already covered elsewhere, but I can't seem to figure out how to ensure that a compound key is unique, either via the UI or in the SQL Data Generator project file. Could you give me a hint?

Thanks a lot in advance!
Tagged:

Comments

  • Eddie DEddie D Posts: 1,807 Rose Gold 5

    Hi

    Thank you for your forum post.

    When you view the Column generation settings in the GUI, ensure that 'set unique' check box is set.

    Many Thanks
    Eddie

    Eddie Davis
    Senior Product Support Engineer
    Redgate Software Ltd
    Email: support@red-gate.com
  • That works fine for a single column on its own, but what I need is the combination of multiple columns to be unique.

    In fact, in our case, our business logic requires that some of the individual columns are not unique. In one column, we are using IDs that only allow a handful of different values, but we must produce hundreds to thousands of new random records.
  • Eddie DEddie D Posts: 1,807 Rose Gold 5
    Hi

    Thank you for your forum post.

    The root of the problem is that SDG generates each column independently of the others and therefore does not handle compound constraints correctly. I have added the details of this forum post to an existing Bug Report SDG-921, sadly I do not have an ETA as to when a bug fix version may become available.

    Many Thanks
    Eddie
    Eddie Davis
    Senior Product Support Engineer
    Redgate Software Ltd
    Email: support@red-gate.com
  • CoryCory Posts: 1 New member
    This is a critically important feature to us...is there any update regarding when it might be implemented correctly?
  • Eddie DEddie D Posts: 1,807 Rose Gold 5
    Hi Cory,
    Sadly, Bug Report SDG-921 is still open and I do not have an ETA as to when a bug fix version may become available. Sorry.
    Eddie Davis
    Senior Product Support Engineer
    Redgate Software Ltd
    Email: support@red-gate.com
  • bclewisbclewis Posts: 2 New member
    Is this still an issue?  Are there any workarounds for generating unique tuples with this software?
Sign In or Register to comment.