During the sales order migration I get this error:
CDbCommand failed to execute the SQL statement: SQLSTATE[42000]: Syntax error or access violation: 1064 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 ‘LIMIT 1’ at line 1
The system keeps the status on processing but does nothing anymore.
I can reset step 7 but when I try again this error comes up again.
5 answers
Hi there,
Let’s enable debug mode of our tool with steps as indicated in the guide of our tool in Readme.html (included file in your downloaded package)
And rerun data migration in the step #7. And provide me details the error message you see. I will check further and help you out.
Regards,
Mall.
This is the error in debug mode:
CDbCommand failed to execute the SQL statement: SQLSTATE[42000]: Syntax error or access violation: 1064 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 ‘LIMIT 1’ at line 1. The SQL statement executed was: SELECT * FROM `sales_shipment_item` `t` WHERE parent_id = 19948 AND order_item_id = LIMIT 1
Hi there,
MySQL server version for the right syntax to use near ‘LIMIT 1’ at line 1. The SQL statement executed was: SELECT * FROM `sales_shipment_item` `t` WHERE parent_id = 19948 AND order_item_id = LIMIT 1
That issue because your database has some records with bad data in the table sales_shipment_item. To handle that, you could do followings steps:
Step 1: Download the php file at HERE
Step 2: Upload downloaded file to the file at path: pub/ub-tool/protected/controllers/Step7Controller.php
Step 3: Once done, you can continue with data migration in the step #7
Regards,
Mall.
Step 7 is ok now but I get the same error in 8 now:
CDbCommand failed to execute the SQL statement: SQLSTATE[42000]: Syntax error or access violation: 1064 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 ‘AND store_id = 0 LIMIT 1’ at line 1. The SQL statement executed was: SELECT * FROM `rating_option_vote_aggregated` `t` WHERE rating_id = 2 AND entity_pk_value = AND store_id = 0 LIMIT 1
Hi there,
MySQL server version for the right syntax to use near ‘AND store_id = 0 LIMIT 1’ at line 1. The SQL statement executed was: SELECT * FROM `rating_option_vote_aggregated` `t` WHERE rating_id = 2 AND entity_pk_value = AND store_id = 0 LIMIT 1
That is one more case with bad data in the table rating_option_vote_aggregated. Some records has relation with products which was not existing in your database. To handle that, you could do followings steps:
Step 1: Download the php file at HERE
Step 2: Upload downloaded file to the file at path: pub/ub-tool/protected/controllers/Step8Controller.php
Step 3: Once done, you can continue with data migration in the step #8
Regards,
Mall.