MySQL Forums
Forum List  »  Newbie

Re: Import Excel ods file problem
Posted by: Jane Morrell
Date: March 28, 2022 07:43AM

I tried:
INSERT INTO race_details TABLE Sheet1;
But in the SQL page on the left side there is a red X which reads 'Unexpected keyword (near TABLE)'
However, I did try it and this is the Error:
Error
Static analysis:
2 errors were found during analysis.
Unexpected keyword. (near "TABLE" at position 25)
Unrecognized statement type. (near "TABLE" at position 25)
SQL query: Copy
INSERT INTO race_details TABLE Sheet1;
MySQL said: Documentation
#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 'TABLE Sheet1' at line 1


I then tried without the 'parenthesis around the SELECT list'
INSERT into race_details(id, name, loft_number, race_code, ring_number, miles, yards, hours, minutes, seconds, clocked, time_field) SELECT A, B, C, D, E, F, G, H, I, J, K, L from Sheet1;

"Bingo, it worked"

I do thank both Peter and Barry helping this I wont say Novice, as a more apt description would be 'Know nothing very elderly lady'.

Options: ReplyQuote


Subject
Written By
Posted
Re: Import Excel ods file problem
March 28, 2022 07:43AM


Sorry, you can't reply to this topic. It has been closed.

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.