how to use SQL Data Generator

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.

Comments

  • 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
  • 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.
  • 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
Sign In or Register to comment.