Options

Populate a column conditional on data from another column???

nolan118nolan118 Posts: 2
Is it possible to configure a column to be populated based on the values of another column within the table?

For example,
I have a table with two fields both integers. I configure column A to be populated with a random number between 0 and 10.
Now I only want column B to be populated (with the value 1) if column A is greater than 5.

Is this possible?

Thanks in advance
:)

Comments

  • Options
    Hello,

    Thanks for your post. Currently, this is not possible within the application, however I have made a note to review your request for future versions.

    Thanks

    Ben
  • Options
    No reply necessary.

    I would like to add my 2 cents on this feature - it would be VERY handy. I have a table where there is a CaseType column and a CaseSubType column. Some CaseType/CaseSubType value combinations are not valid. So to be able to constrain the value of CaseSubType based on the value of CaseType would be a great feature.
  • Options
    I would also like this. I have an app where every table has a Modified By and Modified Date. However, since we have a lot of legacy data, there are nulls in the columns. I would like to generate random modified by's, but then only generate a date if there is a non-null modify by.
  • Options
    I have a reporting database, and I need the 5+ columns in my reporting tables to add up to a specific number, specifically 100%. I guess I could PIVOT a 3 column layout with ID, PercentGroup, Value but I would still need the column sections within each ID to add up to 100% before I PIVOT it.

    Please consider this in your next development cycle
  • Options
    I'd also like to add my voice to get this included in the next release. I have a table that has a foreign key made up of two columns. This feature would enable me to populate the child table correctly and maintain the relationship.
  • Options
    This feature would certainly be necessary. Especially in databases with moderate to high complexity where interdependency between tables is daily business.
    The absence of the feature is one reason why the application is not in use here.
  • Options
    I have a similar issue.

    In my table I have colA and colB, colA MUST be 1 if ColB has any value in it, otherwise colA should be 0. I cannot seem to get Data Generator to insert any rows, it just returns an error saying the INSERT conflivted with a check constraint.

    In the UI I have colA set to bit, no nulls and colB to description allow nulls. I have the "when data is invalid" option set to "skip row".

    Why do no rows get inserted? surely some rows must be generated that are colA=1, colB='Some text'??

    Senior DBA
    Careers South West Ltd
  • Options
    Would like ot add my voice to the calls for this feature to be added.

    My use case:

    have a field with a numeric value (say Cost) and a second also numeric (say Price). Would like the ability to do the equivalent of

    Price expression == $[Cost] * 1.8

    or the reverse :)
Sign In or Register to comment.