The INSERT into Select command on the MyBatis does not end, and it concludes that SQL was written incorrectly, but it is not a problem to execute in Plsql. Finally, the problem is solved,
is the setup problem.
# # # Cause:java.sql.sqlsyntaxerrorexception:ora-00933:sql command did not end correctly
The original configuration:
<insert id= "Addhistorybypostbatchno" parametertype= "Parammap" >
Modified later, added a
Usegeneratedkeys= "false"
<insert id= "Addhistorybypostbatchno" parametertype= "Parammap" usegeneratedkeys= "false" > insert into Tb_dispatch_mail_history ( mail_no, Rec_name, rec_address, Rec_telephone, customer_no, Post_opter, Mail _content_name, Mail_weight, actual_postage, Delivery_area, Post_time, Post_condition, Post_status, Post_ Batchno, customer_id ) Select mail_no, Rec_name, rec_address, Rec_telephone, customer_no, Post_ Opter, Mail_content_name, Mail_weight, actual_postage, Delivery_area, Post_time, post_condition, post_ Status, Post_batchno, customer_id from tb_dispatch_mail_post tp <where> tp.post_batchno=#{ Parammap.postbatchno} </where> </insert>
Problem solved smoothly, not error. If you also encounter the same problem, please leave a message to discuss, I just solved the problem. If you see here you solve the problem, trouble to praise it!
The explanation of the official website is
Allows JDBC support to generate primary keys automatically, requiring driver compatibility. If set to true this setting forces the use of auto-generated primary keys, although some drivers are not compatible but still work (such as Derby).
The INSERT into Select command for MyBatis does not end.