can SQL DG calculate a column value?

The simplest way to populate your database with test data.

Moderators: David Atkinson, Anu Deshpande, Lionel

can SQL DG calculate a column value?

Postby icecurtain » Thu Mar 24, 2011 11:30 am

Just evaluting SQL data generator and if anyone can tell me if this is possible.
Circa 10,000,000 row need to be created.

COL A (Qty) = Random number 1-50
COL B (Qty_Delivered) must be lower than COL A
COL C (Qty_Outstanding) = A-B
COL D (Inv Total Price) = A*E
COL E (Price)= Random cost £1.00-£500.00

Col A and E are easy to produce.
Do I need to create a temp table or can this be done by script?
icecurtain
 
Posts: 10
Joined: Mon Jan 18, 2010 6:11 pm

Postby peter.peart » Fri Mar 25, 2011 5:44 pm

Hi there,

Thanks for your post. Unfortunately, it isn't possible to populate data for columns based on the sum of other columns, i.e. dictate a column relationship other than PK > FK.

We do however have this as an existing feature request in place of which I will add your request to, however I sorry to say that we don't have a timescale at the moment for if / when this feature is likely be implemented.

HTH!

Pete
Peter Peart
Red Gate Software Ltd
+44 (0)870 160 0037 ext. 8569
1 866 RED GATE ext. 8569
peter.peart
Site Admin
 
Posts: 362
Joined: Tue Sep 02, 2008 9:58 am
Location: Top floor, RG towers with the cool kids

Postby icecurtain » Wed Mar 30, 2011 2:13 pm

Thanks for the reply. I would definitely like it as a new feature!
icecurtain
 
Posts: 10
Joined: Mon Jan 18, 2010 6:11 pm

Postby tilo23 » Fri Dec 23, 2011 10:56 am

Hello,
It actually IS possible - you need to add a script creating trigger ON INSERT before the data generation. To do this Edit project and open Scripts tab.
Inside the Dilbert's world
tilo23
 
Posts: 19
Joined: Thu Dec 22, 2011 3:56 pm
Location: Berkshire, UK


Return to SQL Data Generator 1

Who is online

Users browsing this forum: No registered users and 0 guests