Please start any new threads on our new
site at https://forums.sqlteam.com. We've got lots of great SQL Server
experts to answer whatever question you can come up with.
Author |
Topic |
jdsmith8
Starting Member
11 Posts |
Posted - 2013-08-10 : 20:27:13
|
Hi All,I started to import a SQL DB file that I thought worked in the past, but I get an initial error when IMPORTING it and the SQL DB is blank before the import.The error is: #1064 - You have an error in your SQL syntax; check the manual that corresponds to your MySQL server version for the right syntax to use near 'TYPE=MyISAM AUTO_INCREMENT=91 AUTO_INCREMENT=91' at line 8 and the code from the SQL FILE is:CREATE TABLE IF NOT EXISTS `default_setup_category` (`category_id` bigint( 20 ) NOT NULL AUTO_INCREMENT ,`category_parent` bigint( 20 ) NOT NULL default '0',`category_path` text NOT NULL ,`category_pathname` text NOT NULL ,`category_name` text NOT NULL ,PRIMARY KEY ( `category_id` )) TYPE = MYISAM AUTO_INCREMENT =91 AUTO_INCREMENT =91;I do leave the SQL COMPATIBILITY MODE set to NONE since there is not a plain MYSQL option under it.The dropdown for FORMAT I do have as SQL...Anyone familiar with an error of a script that is trying to create a table if it is non-existent??Thanks in advance,JayJames Smith |
|
MuMu88
Aged Yak Warrior
549 Posts |
Posted - 2013-08-10 : 21:31:06
|
[CODE]CREATE TABLE IF NOT EXISTS `default_setup_category` (`category_id` bigint( 20 ) NOT NULL AUTO_INCREMENT ,`category_parent` bigint( 20 ) NOT NULL default '0',`category_path` text NOT NULL ,`category_pathname` text NOT NULL ,`category_name` text NOT NULL ,PRIMARY KEY ( `category_id` )) ENGINE = MYISAM AUTO_INCREMENT =91;[/CODE]REF: As per http://stackoverflow.com/questions/9680349/error-1064-in-mysql: |
|
|
jdsmith8
Starting Member
11 Posts |
Posted - 2013-08-10 : 23:07:27
|
Thanks so much!!! I guess I need to do a search & replace and replace TYPE throughout the SQL file.Are there any other terms that have changed that this old SQL DB file might be using that I would also need to change... Some call function like this one?JayJames Smith |
|
|
jdsmith8
Starting Member
11 Posts |
Posted - 2013-08-11 : 17:45:13
|
That worked and it imported...Thanks all..James Smith |
|
|
|
|
|
|
|