You are viewing a plain text version of this content. The canonical link for it is here.
Posted to notifications@shardingsphere.apache.org by GitBox <gi...@apache.org> on 2020/02/21 09:24:52 UTC

[GitHub] [incubator-shardingsphere] kyllyang opened a new issue #4403: Insert statements with subqueries do not generate SQL correctly.

kyllyang opened a new issue #4403: Insert statements with subqueries do not generate SQL correctly.
URL: https://github.com/apache/incubator-shardingsphere/issues/4403
 
 
   ## Question
   
   **insert into (c0, c1, c2) values (v0, (select max(o.v) from other o where o.id = ?), v2), subqueries like this do not generate the correct SQL statement.**
   
   In my project I encountered the case of including subqueries in **insert** statements,
   
   - Original statement: insert into order(c1, c2, c3, c4) values(1,'1',(select ifnull(max(t.s),0)+1 from t_seq t where t.k=1),'1')
   - Generated statement: insert into order(c1, c2, c3, c4) values(1, '1', (selectifnull(max(t.s),0)+1 fromt_seqtwheret.k=1), '1')
   
   In the generated statement, the Spaces in the subquery section are completely removed.
   Is this SQL writing currently not supported?Or are there alternatives?
   
   I am looking forward to your reply. Thanks to ShardingSphere!

----------------------------------------------------------------
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:
users@infra.apache.org


With regards,
Apache Git Services

[GitHub] [incubator-shardingsphere] terrymanu closed issue #4403: Insert statements with subqueries do not generate SQL correctly.

Posted by GitBox <gi...@apache.org>.
terrymanu closed issue #4403: Insert statements with subqueries do not generate SQL correctly.
URL: https://github.com/apache/incubator-shardingsphere/issues/4403
 
 
   

----------------------------------------------------------------
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:
users@infra.apache.org


With regards,
Apache Git Services

[GitHub] [incubator-shardingsphere] terrymanu commented on issue #4403: Insert statements with subqueries do not generate SQL correctly.

Posted by GitBox <gi...@apache.org>.
terrymanu commented on issue #4403: Insert statements with subqueries do not generate SQL correctly.
URL: https://github.com/apache/incubator-shardingsphere/issues/4403#issuecomment-590684825
 
 
   Can not support subquery now.
   We prepare create a new feature for subquery in future.

----------------------------------------------------------------
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:
users@infra.apache.org


With regards,
Apache Git Services