Generating data that respects logical partitions
jonsagara
Posts: 1 New member
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
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
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?