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

SQL Import not working after export -

User, date Message
Written by loopstudio
5 years ago
Category: Import/Export
4 posts since Sat, 11 Apr 09


No matter if I use revision 1691 or the newest 2374 of HeidiSQL both to export/dump a table and afterwards tries to import/load it again using HeidiSQL it gives the error shown on the picture.

ERROR:
You have an error in your SQL syntax - check the manual - right syntax to use near xxx WRITE at line 1.

I use 5.0.45 community version of MySQL Server.
And I have checked the manual 5.0 should support the line LOCK TABLES...

---- snap from my SQL file created by HeidiSQL ---
#
# Dumping data for table 'lytter_genrer'
#

LOCK TABLES "lytter_genrer" WRITE;
/*!40000 ALTER TABLE "lytter_genrer" DISABLE KEYS;*/
REPLACE INTO "lytter_genrer" ("pID", "gID", "cID") VALUES
(760,1,0);
------------------------------------------------------------

What is wrong?
Why is it not possible to export AND import in the excact same version of HeidiSQL?
What should I do in order to be able to import again?
Written by ansgar
5 years ago
4940 posts since Fri, 07 Apr 06
> HeidiSQL it gives the error shown on the picture.

No picture here.

>You have an error in your SQL syntax - check the manual -
> right syntax to use near xxx WRITE at line 1.

What is "xxx" - the most important part of the error message ?
Written by loopstudio
5 years ago
4 posts since Sat, 11 Apr 09
The error "xxx" was...:

Error.
SQL Error: You have an error in your SQL syntax; check the manual that corresponds to your MySQL server version for the right syntax near '"my_table" WRITE' at line 1.

But I mean. the whole SQL-file is MADE by HeidiSQL's export function, so why can it not IMPORT it again?
Written by loopstudio
5 years ago
4 posts since Sat, 11 Apr 09
my_table is "lytter_genrer"
Written by rosenfield
5 years ago
127 posts since Wed, 24 Jan 07
may be because you're trying to import ANSI SQL to a MySQL server in default (non-ANSI) mode.

if you are not going to be using MSSQL, PostgreSQL or similar, just export files in "mysql" mode.
Written by loopstudio
5 years ago
4 posts since Sat, 11 Apr 09
Oh Rosenfield! Thank u! THAT was the case! :)
 

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