Hitachi Vantara Pentaho Community Forums
Results 1 to 5 of 5

Thread: Add values in update step

  1. #1
    Join Date
    Nov 2013
    Posts
    382

    Default Add values in update step

    Hi,
    is there any way to add input values (instead of replacing them) to the table values in an update step? Any easy way to do it? All I can think of involve several steps ... and I guess there must be a simpler way to do it!

    Thks

  2. #2
    Join Date
    Nov 2009
    Posts
    688

    Default

    With the Insert/Update step

  3. #3
    Join Date
    Nov 2013
    Posts
    382

    Default

    Thanks for the answer, but as far as I know Insert/Update step also substitutes the table value with the input values. I cannot find any option on the Insert/Update step to add values.

    Colud you clarify how do I tell I/U that certain fields need to be added?

  4. #4
    Join Date
    Nov 2009
    Posts
    688

    Default

    In the insert/update step you have a check box for "Don't perform any updates"

  5. #5
    Join Date
    Nov 2013
    Posts
    382

    Default

    And checking "Don't perform any updates" means "add values" ?

    Sorry, I must be sleeping , but I don't understand. I do want updates, but I want to add some values and not some others.

    My input table gets
    1. myId
    2. myString
    3. myValue1
    4. myValue2

    When a record whit myId exists I want update to substitute myValue1 but add myValue2 to whatever is already on the output table.

    Now I solved with a SQL script step with the option 'execute for each row' and a sentence like

    update myTable set TmyValue1=?, TmyValue2=TmyValue2+? where TmyId=?

    and setting myValue1, myValue2 and myId as parameters.

    But it seems to me a poor solution if there is a step that can do that.

    Thks
    Last edited by DepButi; 01-29-2014 at 09:01 AM. Reason: spelling

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •  
Privacy Policy | Legal Notices | Safe Harbor Privacy Policy

Copyright © 2005 - 2019 Hitachi Vantara Corporation. All Rights Reserved.