 |
SoftTree Technologies
Technical Support Forums
|
|
Author |
Message |
ssandu
Joined: 26 Feb 2007 Posts: 95 Country: Romania |
|
Test data generator question |
|
Hi
I hace a table with ID and name and I need some test data inserted.
I found in library data some samples with id and name (04.contry_codes)
How can I insert this data in my table ?
If I select code for id and name for name I get diferent codes for different countries.
How can I insert both in the same time ?
Thank you !
|
|
Fri Oct 09, 2015 8:11 am |
|
 |
SysOp
Site Admin
Joined: 26 Nov 2006 Posts: 7948
|
|
|
|
From the data generator point of view, each column is kind of independent. It cannot reconcile their values during the data generation.
Your case sounds simple, 2 columns from the same lookup, but then somebody may have a case with 3 columns or 5 columns, it's not that simple.
Here is what you can do. Create a test generator project that populates your countries table with randomly picked codes and names. Then create a unit test project (using the Unit Tests framework in SQL Assistant) for the countries table, which you can then link to test generator project for the initial data seed. In the unit test for the countries table, add a small SQL UPDATE script that will update country names based on the populated country codes after the table is populated by the data generator.
Hope this makes sense.
|
|
Fri Oct 09, 2015 9:48 am |
|
 |
|
|
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
|
|
|