In addition to Weibo, there is also WeChat
Please pay attention
WeChat public account
Shulou
2025-03-31 Update From: SLTechnology News&Howtos shulou NAV: SLTechnology News&Howtos > Database >
Share
Shulou(Shulou.com)05/31 Report--
This article mainly explains "how to transfer database SQLServer to MySQL database". The content in the article is simple and clear, and it is easy to learn and understand. Please follow the editor's train of thought to study and learn "how to transfer database SQLServer to MySQL database".
Brief description of bug: after sql is converted from SQLServer to MySQL, it can be executed under navicat, but an error is reported in the project.
The error is as follows:
1-1
# Error querying database. Cause: com.mysql.jdbc.exceptions.jdbc4.MySQLSyntaxErrorException: You have an error in your SQL syntax; check the manual that corresponds to your MySQL server version for the right syntax to use near 'Create TEMPORARY TABLE temp_table3
Select * from (
Select * from VIEW_UserMe' at line 2
# The error may exist in XX/XXX/XXXX/XXXXX/mapper/XXXXXMapper.xml
# The error may involve defaultParameterMap
# The error occurred while setting parameters
# SQL: Drop TEMPORARY TABLE IF exists temp_table3; Create TEMPORARY TABLE temp_table3 select * from (select * from VIEW_UserMeter where supplierID = 1 and SampleTime between date_sub (NOW (), interval 1 day) and date_add (NOW (), interval 1 day)) as a Select * from (SELECT ROW_NUMBER () OVER (ORDER BY sampleTime) AS rownumber, building,entrance,doorplate,village,userName,remark1,remark2,meterId,meterSize,total,pressure,flowRate,valveStatus,status,updateTime,timeInp,vol,operate_ValveStatus,sampleTime,t1Inp FROM temp_table3) cc WHERE cc.rownumber > 0 limit 50; Drop TEMPORARY TABLE IF exists temp_table3
# Cause: com.mysql.jdbc.exceptions.jdbc4.MySQLSyntaxErrorException: You have an error in your SQL syntax; check the manual that corresponds to your MySQL server version for the right syntax to use near 'Create TEMPORARY TABLE temp_table3
Select * from (
Select * from VIEW_UserMe' at line 2
; bad SQL grammar []; nested exception is com.mysql.jdbc.exceptions.jdbc4.MySQLSyntaxErrorException: You have an error in your SQL syntax; check the manual that corresponds to your MySQL server version for the right syntax to use near 'Create TEMPORARY TABLE temp_table3
Select * from (
Select * from VIEW_UserMe' at line 2
...
Paste out the sql for execution, as shown in the following figure, which can be executed successfully to query the results and rule out the possibility of conversion errors:
1-2
Go back to the console error:
# The error may involve defaultParameterMap
# The error occurred while setting parameters
Consider whether MyBatis does not support semicolon ";" in SQL configured by XML. After query, allowMultiQueries=true,MyBatis is enabled to support batch processing of sql.
As shown below:
1-3
Restart the project, it can be executed successfully, and the problem is solved.
Thank you for your reading, the above is the content of "how to transfer database SQLServer to MySQL database". After the study of this article, I believe you have a deeper understanding of how to transfer database SQLServer to MySQL database, and the specific use needs to be verified in practice. Here is, the editor will push for you more related knowledge points of the article, welcome to follow!
Welcome to subscribe "Shulou Technology Information " to get latest news, interesting things and hot topics in the IT industry, and controls the hottest and latest Internet news, technology news and IT industry trends.
Views: 0
*The comments in the above article only represent the author's personal views and do not represent the views and positions of this website. If you have more insights, please feel free to contribute and share.
Continue with the installation of the previous hadoop.First, install zookooper1. Decompress zookoope
"Every 5-10 years, there's a rare product, a really special, very unusual product that's the most un
© 2024 shulou.com SLNews company. All rights reserved.