MySQL Forums
Forum List  »  Newbie

Re: Import Excel ods file problem
Posted by: Barry Galbraith
Date: March 28, 2022 06:29AM

It looks like I should have checked the refman instead of relying on memory.
https://dev.mysql.com/doc/refman/8.0/en/insert-select.html

There is no 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;

The refman even has a shortcut if your MySQL = 8.0.19 or greater.

INSERT INTO race_details TABLE Sheet1;

Good luck,
Barry.

Options: ReplyQuote


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


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.