joewee commented on issue #3856: Parse `ON DUPLICATE KEY UPDATE xxx= 
VALUES(xxx)` error
URL: 
https://github.com/apache/incubator-shardingsphere/issues/3856#issuecomment-575551814
 
 
   > @joewee Could you please provide small SQL to me for validation?
   
   @SteNicholas Yes, of course! Please try the following small SQL
   insert into product_sharding 
(product_code,brand_code,name,update_time,archived,version) values (?,?, ?,?, 
?, 0) on duplicate key update brand_code = if(@update_condition :=(update_time 
< values(update_time)),values(brand_code),brand_code),name = 
if(@update_condition ,values(name),name),archived = 
if(@update_condition,values(archived),archived),version = 
if(@update_condition,version +1,version),update_time = 
if(@update_condition,values(update_time),update_time)

----------------------------------------------------------------
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
 
For queries about this service, please contact Infrastructure at:
us...@infra.apache.org


With regards,
Apache Git Services

Reply via email to