Jump to content

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

This thread is more than a year old. Please don't revive it unless you have something important to add.

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.

Guest
Reply to this topic...

×   Pasted as rich text.   Restore formatting

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

×
×
  • 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.