Link to home
Start Free TrialLog in
Avatar of Ian Bell
Ian BellFlag for United Kingdom of Great Britain and Northern Ireland

asked on

Mysql for Excel error message "too many keys"

Hi,
If someone with experience using the MYSQL fo Excel version, can you please advise how to create a table from Excel.
My own effort failed. I had  selected 469 columns and 20 rows and it came up
on the screen, so far so good. I then clicked on Export data. Then the following message appeared.
What keys are they ??? There was a primary key which was automatically created.
Thanks for any help
Ian
 
"The MySQL Table `ukh_ireahcp` could not be created because of the following error(s):
MySQL Error 1069:
Too many keys specified; max 64 keys allowed"
Avatar of David Favor
David Favor
Flag of United States of America image

Looks like you're attempting to create a table from an Excel spreadsheet + your generated create table statement is attempting to create an index for every column... so... if you have >64 columns, you'll see this message.

You'll have to dig into Excel for MySQL + determine how to create your table differently.

Generally, if I had to do this, I'd just export the Excel spreadsheet as a .csv file + import the .csv files as simple data (no indexes) if data was large. Then go back + create your indexes afterward.
Avatar of Ian Bell

ASKER

I also tried creating it as a csv file but got the same message
Try creating your table first, then importing your data.
I tried once more using the csv file 469 columns 20 rows then clicked export data button and screen flashed on and off for around two miuntes and got a message asking to save file. I chose to save and excel crashed !!
Where is the create table on the mysql for Excel side menu ?
The only one that is closest is the one I use   Export Excel Data to New Table. It is sub titled create a new table and fill it with data.
The message "cannot save due to row insertion" is a completely different problem.

I don't use Excel for MySQL, rather I prefer loading CSV data, so I'd save a spreadsheet as CSV data first, to strip out any code... like macros + formula calculations which built columns from other columns.

Excel has many unique characteristics which don't map well to data tables.

I've always opted to convert any tabular data to CSV first, before ingesting it into a data table.
Trying to mix Excel + MySQL seems like it will likely add many hours of extra work, each time you have to move data from a spreadsheet to MySQL.
So how would you propose I do it ? All my work is in Excel with columns up to 490 and
rows up to one million.
Thanks
From what you say Mysql is not so Excel friendly.
How about I skip the Excel csv approach and save all the files in text format. Would that be a simpler approach
for a non coder like myself ? or should I give up  and stay with Excel which I am more familiar with. Seems like SQL
databases are a steep learning code for us novices.
ASKER CERTIFIED SOLUTION
Avatar of Ian Bell
Ian Bell
Flag of United Kingdom of Great Britain and Northern Ireland image

Link to home
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
Start Free Trial
You're welcome!