I'm having trouble importing data to mySQL. I'm an "oldie" SQL-wise, but a newbie to mySQL. Yesterday I downloaded mySQL 5.7. Then I downloaded the Workbench. The main tool I have used in the past for importing and exporting data from an RDBMS was Aqua Data Studio. I was hoping to find the same features in the Workbench, but so far here is what I have and what I've done. All I get for an error is existcode -1.
A colleague extracted data from a totally different database, which created an Excel file. (Our grad school's library system uses MS Access (bleah!) as its database. So what I have is an Excel file. There are three columns of the same kinds of data. I need basically to do a union of all three tables to produce one column that has no duplicates. The data are bibliographic ID numbers. Excel thinks these numbers are text, but that should not matter for what i am doing. So I
1. put each column into its own spreadsheet.
2. Saved the result as a csv file, though .csv is not the file type in the file name. Perhaps that is important?
3. In the mySQL Workbench, I went to Tools->Data Import, and followed the steps there but got an error for my SQL statement. The file has no SQL statements. I was hoping/expecting that, like Aqua DataStudio, the Workbench would give me a chance to see what it thinks the data looks like, ask it to create a table based on what is there (160,000+ lines with a number on each line, i.e., 1 column of data) and insert the necessary SQL to build the table and insert each row. I really don't want to spend the next week wrapping each number in an insert statement myself.
I looked up Data Import in the doc and it looked to me like what I want does exist in mySQL: a data import page that steps you through all the things needed to turn a raw file into a table with many rows.
However, I did not see that screen. The screen I saw gave me a choice between importing a proejct dump file or my own file. I chose the latter. When I ran it, I got an error for my SQL statements.
So am I trying to do this from the wrong place? Or do I need to find a tool that will put "Insert into table around every single line in my file? Thanks.
Ken
A colleague extracted data from a totally different database, which created an Excel file. (Our grad school's library system uses MS Access (bleah!) as its database. So what I have is an Excel file. There are three columns of the same kinds of data. I need basically to do a union of all three tables to produce one column that has no duplicates. The data are bibliographic ID numbers. Excel thinks these numbers are text, but that should not matter for what i am doing. So I
1. put each column into its own spreadsheet.
2. Saved the result as a csv file, though .csv is not the file type in the file name. Perhaps that is important?
3. In the mySQL Workbench, I went to Tools->Data Import, and followed the steps there but got an error for my SQL statement. The file has no SQL statements. I was hoping/expecting that, like Aqua DataStudio, the Workbench would give me a chance to see what it thinks the data looks like, ask it to create a table based on what is there (160,000+ lines with a number on each line, i.e., 1 column of data) and insert the necessary SQL to build the table and insert each row. I really don't want to spend the next week wrapping each number in an insert statement myself.
I looked up Data Import in the doc and it looked to me like what I want does exist in mySQL: a data import page that steps you through all the things needed to turn a raw file into a table with many rows.
However, I did not see that screen. The screen I saw gave me a choice between importing a proejct dump file or my own file. I chose the latter. When I ran it, I got an error for my SQL statements.
So am I trying to do this from the wrong place? Or do I need to find a tool that will put "Insert into table around every single line in my file? Thanks.
Ken