Populating depending fields

Powerful and fully customizable utility that generates data for database testing purposes

Moderator: Support Team

Populating depending fields

Postby hari » Tue Sep 13, 2011 9:19 am

I am having a table "test" which has columns called "A" and "B". While populating the column "B" in table "test", The coulmn "B" shoud get the values from another table called "test_master" based on column "A" in the "test" table.

Can anyone suggest any solution without using epilogue scripts.
hari
 

Re: Populating depending fields

Postby Support Team » Tue Sep 13, 2011 12:29 pm

Please consider creating epilogue script that will update column "B"
Example (pseudo code):

update "test" set B=3 where A is in (select ID from "test_master")

There are 2 steps:
1) at the first the generator fill in column A
2) at the second it will execute some SQL script that updates column B bases on A values generated at the first step.

Another way is to use built in pattern engine (see $Query function) but described method is faster.
Support Team
 
Posts: 256
Joined: Sun Mar 26, 2006 3:48 pm


Return to DTM Data Generator, Flat File Generator and Test XML Generator

Who is online

Users browsing this forum: No registered users and 2 guests

cron