HoltYin opened a new issue #8754:
URL: https://github.com/apache/shardingsphere/issues/8754


   **version:**
   5.0.0-alpha
   **project:**
   shardingsphere-jdbc-core-spring-boot-starter
   **sql:**
   INSERT INTO test ( id, test, count )
   VALUES
        ( 13, 1, 2 ) 
        ON DUPLICATE KEY UPDATE 
        id =
   IF
        ( @update_condition := ( count < VALUES ( count ) ), VALUES ( id ), id 
),
        test =
   IF
        ( @update_condition, VALUES ( test ), test ),
        count =
   IF
        ( @update_condition, VALUES ( count ), count )
   
   **exception:**
   line 1:106 no viable alternative at input 'IF(@update_condition:'
   
![image](https://user-images.githubusercontent.com/25241944/103080281-79b10f00-4610-11eb-86b5-736ea4d5f5ac.png)
   **Reason analyze:**
   maybe can't parse ":=",i try it without":" like  @update_condition = ( count 
< VALUES ( count ) ),it worked
   


----------------------------------------------------------------
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:
[email protected]


Reply via email to