Search code examples
javasqlderbypentahokettle

Why doesnt my SQL Update query with increment/decrement execute from Pentaho on Derby?


I'm trying to execute SQL query using Pentaho on Derby database? The query is very simple. It's to update the value of column to increase/decrease 1 on it.

enter image description here

When I modified the query to this : UPDATE APP.PROCLOGS SET FAIL = 22 WHERE ID = ${pid}, it works normal.

So why am I unable to execute this query to increase/decrease the value of the column?

Regards,


Solution

  • use question mark to use the fields name as an argument:

    UPDATE APP.PROCLOGS SET FAIL = ? WHERE ID = ${pid}
    

    if you need to increment the FAIL value +1 do it in previous step. the ? placeholder can not handle this operation.