how to use SQL Data Generator

The simplest way to populate your database with test data.

Moderators: JonathanWatts, David Atkinson, Anu Deshpande, Michelle Taylor, Lionel, Emma A, sherr

how to use SQL Data Generator

Postby paripurnachary4u » Mon Apr 23, 2012 8:16 am

I had 5 tables in my database. 4 of them are having referencing with 5th table. i want to generate the data in 4 tables into that 5th table and want to use the data of that 5th table. is it possible with sql data generator tool. So, in the tables to populate pane, i have to select 4 tables only or the 5th table also? kindly help me in solving this issue.
paripurnachary4u
 
Posts: 3
Joined: Thu Apr 19, 2012 3:32 pm

Postby Manfred.Castro » Tue Apr 24, 2012 10:56 am

If I understand your question correctly you would like to populate the 5th table with data from the other four tables. If this is the case, you would select all 5 tables to populate but for each column referenced by data from another table in the 5th table you would set the generator to sql type - foreign (manual) key generator which allows you to populate the column with data from another column in another table.

For more information follow the link.

http://www.red-gate.com/supportcenter/content/SQL_Data_Generator/help/2.0/SDG_About_generators
Manfred Castro
Product Support
Red Gate Software
Manfred.Castro
 
Posts: 209
Joined: Mon Apr 23, 2012 2:49 pm

Postby paripurnachary4u » Tue Apr 24, 2012 3:26 pm

Thanks for the reply castro, but if i select 5th table also in the 'tables to populate pane', how can i ensure that data from the 4 tables will be generated into the 5th table. what i mean is how can i set the 5th table as destination.
paripurnachary4u
 
Posts: 3
Joined: Thu Apr 19, 2012 3:32 pm

Postby Manfred.Castro » Tue Apr 24, 2012 4:42 pm

For each column in the 5th table that corresponds to data in another table you will set the Generator (the drop down at the top after selecting the column) to:
Sql Type-
Foreign Key (Manual) generator
From there you can set the table and column from which you want to populate data from into the column.
Hope this helps
Manfred Castro
Product Support
Red Gate Software
Manfred.Castro
 
Posts: 209
Joined: Mon Apr 23, 2012 2:49 pm


Return to SQL Data Generator 2

Who is online

Users browsing this forum: No registered users and 0 guests