Hi. I would like to update multiple rows in my DB, using a single query.

I've found a SQL solution that I'd like to implement, as detailed here: 
http://stackoverflow.com/questions/20255138/sql-update-multiple-records-in-one-query

UPDATE config
   SET config_value = CASE config_name 
                      WHEN 'name1' THEN 'value' 
                      WHEN 'name2' THEN 'value2' 
                      ELSE config_value
                      END
 WHERE config_name IN('name1', 'name2');


Some nuances: for my use case, the update-values aren't static constants. 
They are increments to existing DB values. Eg:
WHEN 'name1' THEN (config_value + ' new_value')

How would I implement the above SQL statement in JOOQ?

-- 
You received this message because you are subscribed to the Google Groups "jOOQ 
User Group" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to [email protected].
For more options, visit https://groups.google.com/d/optout.

Reply via email to