How can we help you today? How can we help you today?

can SQL DG calculate a column value?

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
0

Comments

3 comments

  • peter.peart
    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
    0
  • icecurtain
    Thanks for the reply. I would definitely like it as a new feature!
    icecurtain
    0
  • tilo23
    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.
    tilo23
    0

Add comment

Please sign in to leave a comment.