Generating data that respects logical partitions

jonsagarajonsagara Posts: 1 New member
edited May 3, 2017 7:25PM in SQL Data Generator
I have a single physical database whose tables are logically partitioned by a PartitionId (a GUID). As an example, let's say I have two tables:

Order
===
Id
PartitionId
ContactId

Contact
===
Id
PartitionId

When using SQL Data Generator to generate data and fill Order.ContactId, is it possible to tell it to only select Contacts whose PartitionId match the Order.PartitionId?

Thank you,

Jon
Tagged:

Comments

  • Jessica RJessica R Posts: 1,319 Rose Gold 4
    Hi Jon,

    Thanks for your post!

    You can use a SQL Statement generator to generate the data for Contact's PartitionId column.

    You'll need to set the generator to connect to the same database and then the statement can be: SELECT PartitionID FROM Order

    I hope that helps!

    Jessica Ramos | Product Support Engineer | Redgate Software

    Have you visited our Help Center?


Sign In or Register to comment.