MySQL Forums
Forum List  »  General

sql script with multiple insert statements is throwing error
Posted by: Sethu Panicker
Date: May 20, 2024 09:11AM

Hello,

I am very new to mysql. Trying to execute a sql file with about 300 table insert statements. The file is readable in any text editor without any issues. The statements are as below.

insert into orionwms_mysql.TGW_MAWM_INV_SYNC (ItemID,Locked,OnHandQuantity,PurchaseOrderID,DetailQuantity,COOM,COOP,COOF,CreatedDateTime,UpdatedDateTime) values ('00501016204234','N','12','00000000000000000001','12','IN','IN','IN',curdate(),curdate());
insert into orionwms_mysql.TGW_MAWM_INV_SYNC (ItemID,Locked,OnHandQuantity,PurchaseOrderID,DetailQuantity,COOM,COOP,COOF,CreatedDateTime,UpdatedDateTime) values ('00501016503229','N','5','00000000000000000001','5','IN','IN','IN',curdate(),curdate());
insert into orionwms_mysql.TGW_MAWM_INV_SYNC (ItemID,Locked,OnHandQuantity,PurchaseOrderID,DetailQuantity,COOM,COOP,COOF,CreatedDateTime,UpdatedDateTime) values ('00501016504432','N','1','00000000000000000001','1','IN','IN','IN',curdate(),curdate());

The error what I get when executing the below script on mysqlsh is

mysqlsh -p -u xxxxx -h host001 -P3306 -f C:\temp\DataLoad\insertData.sql1
SyntaxError: Invalid or unexpected token at C:\temp\DataLoad\insertData.sql1:1:1
in ��i

I tried mysql command also which doesn't throw an error but the records are not getting inserted.

mysql -p -u xxxxx -h host001 -P3306 --binary-mode -o < C:\temp\DataLoad\insertData.sql1

Thanks,
Seth

Options: ReplyQuote


Subject
Written By
Posted
sql script with multiple insert statements is throwing error
May 20, 2024 09:11AM


Sorry, only registered users may post in this forum.

Content reproduced on this site is the property of the respective copyright holders. It is not reviewed in advance by Oracle and does not necessarily represent the opinion of Oracle or any other party.