Red Gate forums :: View topic - how to use SQL Data Generator
Return to www.red-gate.com RSS Feed Available

Search  | Usergroups |  Profile |  Messages |  Log in  Register 
Go to product documentation
SQL Data Generator 2
SQL Data Generator 2 forum

how to use SQL Data Generator

Search in SQL Data Generator 2 forum
Post new topic   Reply to topic
Jump to:  
Author Message
paripurnachary4u



Joined: 19 Apr 2012
Posts: 3

PostPosted: Mon Apr 23, 2012 8:16 am    Post subject: how to use SQL Data Generator Reply with quote

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.
Back to top
View user's profile Send private message
Manfred.Castro



Joined: 23 Apr 2012
Posts: 205

PostPosted: Tue Apr 24, 2012 10:56 am    Post subject: Reply with quote

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
Back to top
View user's profile Send private message
paripurnachary4u



Joined: 19 Apr 2012
Posts: 3

PostPosted: Tue Apr 24, 2012 3:26 pm    Post subject: Reply with quote

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.
Back to top
View user's profile Send private message
Manfred.Castro



Joined: 23 Apr 2012
Posts: 205

PostPosted: Tue Apr 24, 2012 4:42 pm    Post subject: Reply with quote

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
Back to top
View user's profile Send private message
Display posts from previous:   
Reply to topic All times are GMT + 1 Hour
Page 1 of 1

 
You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot vote in polls in this forum


Powered by phpBB © 2001, 2005 phpBB Group