Error in step 7

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

Profile photo of Mall Staff 184060.00 $tone July 24, 2017
Public

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.

#1
Profile photo of jukebox-revival 2040.00 $tone July 24, 2017
Public

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

#2
Profile photo of Mall Staff 184060.00 $tone July 24, 2017
Public

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.

#3
Profile photo of jukebox-revival 2040.00 $tone July 24, 2017
Public

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

#4
Profile photo of Mall Staff 184060.00 $tone July 25, 2017
Public

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.

#5

Please login or Register to Submit Answer

Written By

Comments