distal-attribute
distal-attribute
distal-attribute
distal-attribute

Simple import not happening

User, date Message
Written by ultimamedia
1 year ago
Category: General
7 posts since Wed, 24 Oct 12
Hi all i want to import a text or csv file using "import" on heidisql but the database im importing too is blank, so it wont let me do it without a table, why cant i just copy/paste SQL and run query like you can do in phpmyadmin? its extremely frustrating, its taken me an hour so far!
please help!
Written by ansgar
1 year ago
4784 posts since Fri, 07 Apr 06
A CSV file does not contain structure, only data. So, you need to create a table before you can import a file into it. Makes sense, doesn't it?
Written by ultimamedia
1 year ago
7 posts since Wed, 24 Oct 12
Hi Anse, thank you for your response is there anyway of just copying and pasting an SQL dump into a fresh database? just like you can in phpmyadmin? my database has about 700 tables so i cant build every single table!
Written by ansgar
1 year ago
4784 posts since Fri, 07 Apr 06

ultimamedia wrote: why cant i just copy/paste SQL and run query like you can do in phpmyadmin? its extremely frustrating, its taken me an hour so far!



Well, you can. SQL is not the problem, just load or paste some SQL queries into the query tab and press the "Execute" button (F9). But you said you have a CSV file, not an SQL file, so I'm confused now.
Written by ultimamedia
1 year ago
7 posts since Wed, 24 Oct 12
yes i have done that so i have one tab that has my empty database and another tab which has my SQL dump in it - how do i get the SQL dump into my database!?
Written by ultimamedia
1 year ago
7 posts since Wed, 24 Oct 12
ok ive done that but it keeps finding small errors, anyway to bypass them
Written by ansgar
1 year ago
4784 posts since Fri, 07 Apr 06
And what are these "small errors" ? Just post error messages here please.
Written by ultimamedia
1 year ago
7 posts since Wed, 24 Oct 12
SQL Error (1062) Duplicate Entry '1 for key1

which want to overwrite and then it gives an error to an individual table but i cant post that until this first one is fixed
Written by ultimamedia
1 year ago
7 posts since Wed, 24 Oct 12
second error attachedhttp://www.ultimadevelopments.info/oxford2012/heidisqlerror.png
Written by ultimamedia
1 year ago
7 posts since Wed, 24 Oct 12
it says duplicates but the tables just are not posting into the database
Written by ansgar
1 year ago
4784 posts since Fri, 07 Apr 06
* "Duplicate Entry": You have a unique or primary key in that table and the script contains more than 1 row with the same value ("1" in your case)
* "USING BTREE" is not supported by MySQL 5.0 and older. See here, or just remove the "USING BTREE" from your script.

I guess you are trying to run a script from a 5.5 server onto an older server?
 

Please login to leave a reply, or register at first.