Jump to content

1024 syntax error


BREZ

Recommended Posts

:facewall:Me old head is sore!

My .sql file is 20Mb in size and keeps timing out on import.

I tried uploading the first table on its own with this error as a result.

Error

 

SQL query: Documentation

 

-------------------------------------------------------- --

-- Program Version 3.0.117

IF NOT EXISTS (

SELECT *

FROM master.dbo.sysdatabases

WHERE name = N 'irishavs_list01'

)

CREATE DATABASE [irishavs_list01] USE [irishavs_list01]

 

MySQL said: Documentation

#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 '----------------------------------------------------------

-- Program Version 3' at line 1

Link to comment
https://forums.phpfreaks.com/topic/168326-1024-syntax-error/
Share on other sites

Pardon my old eyes but....

Is that not exactly the same?

 

Without the CREATE and USE i get an 1064

SQL query: Documentation

 

-------------------------------------------------------- --

-- Program Version 3.0.117

IF NOT EXISTS (

SELECT *

FROM master.dbo.sysdatabases

WHERE name = N 'irishavs_list01'

)

 

MySQL said: Documentation

#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 '----------------------------------------------------------

-- Program Version 3' at line 1

Link to comment
https://forums.phpfreaks.com/topic/168326-1024-syntax-error/#findComment-888029
Share on other sites

A comment (--) needs to have a space after the first 2 hyphens.

-- --------------------------------------------------------
-- Program Version 3.0.117
IF NOT EXISTS (
SELECT *
FROM master.dbo.sysdatabases
WHERE name = N 'irishavs_list01'
)
CREATE DATABASE [irishavs_list01] USE [irishavs_list01]

Link to comment
https://forums.phpfreaks.com/topic/168326-1024-syntax-error/#findComment-888080
Share on other sites

Archived

This topic is now archived and is closed to further replies.

×
×
  • Create New...

Important Information

We have placed cookies on your device to help make this website better. You can adjust your cookie settings, otherwise we'll assume you're okay to continue.