PHWinfo banniere

Titres
PORTAIL ANNUAIRE ARTICLES COMPARATEUR HÉBERGEURS DEVIS FORUMS RÉDUCTEUR D'URL
Précédent   PHWinfo > Autres forums > Forum Programmation & Conception > comp.databases.mysql > Import .sql file into MySQL
S'inscrire FAQ Membres Recherche Messages du jour Marquer les forums comme lus
Import .sql file into MySQL

Réponse
 
LinkBack Outils de la discussion
Vieux 25/10/2007, 14h47   #1
kristincollins77@gmail.com
Aucun Avatar
 
Messages: n/a
Hébergeur:
Par défaut Import .sql file into MySQL

I have a SQL Enterprise database that I need to import into a MySQL
database. I generated a .sql file using the SQL Enterprise generate
script tool, and when I try to import the file. I get the following
error.

ERROR 1064 (42000) at line 1: 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 'IF EXISTS (SELECT name FROM
master.dbo.sysdatabases WHERE name = N'lobster')
DR' at line 1
"

Any is appreciated.

Thanks!

  Réponse avec citation
Vieux 25/10/2007, 15h36   #2
Good Man
Aucun Avatar
 
Messages: n/a
Hébergeur:
Par défaut Re: Import .sql file into MySQL

"kristincollins77@gmail.com" <kristincollins77@gmail.com> wrote in
news:1193320029.760640.275980@o80g2000hse.googlegr oups.com:

> I have a SQL Enterprise database that I need to import into a MySQL
> database. I generated a .sql file using the SQL Enterprise generate
> script tool, and when I try to import the file. I get the following
> error.
>
> ERROR 1064 (42000) at line 1: 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 'IF EXISTS (SELECT name FROM
> master.dbo.sysdatabases WHERE name = N'lobster')
> DR' at line 1
> "
>
> Any is appreciated.
>
> Thanks!
>
>


it looks like the queries in your file aren't all formatted/escaped
properly, and that you have a syntax error near that line. open up the
file and see what it is! early guess is that your apostrophes aren't
escaped... ie: 'lobster' vs \'lobster\'

  Réponse avec citation
Vieux 25/10/2007, 17h23   #3
lark
Aucun Avatar
 
Messages: n/a
Hébergeur:
Par défaut Re: Import .sql file into MySQL

Good Man wrote:
> "kristincollins77@gmail.com" <kristincollins77@gmail.com> wrote in
> news:1193320029.760640.275980@o80g2000hse.googlegr oups.com:
>
>> I have a SQL Enterprise database that I need to import into a MySQL
>> database. I generated a .sql file using the SQL Enterprise generate
>> script tool, and when I try to import the file. I get the following
>> error.
>>
>> ERROR 1064 (42000) at line 1: 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 'IF EXISTS (SELECT name FROM
>> master.dbo.sysdatabases WHERE name = N'lobster')
>> DR' at line 1
>> "
>>
>> Any is appreciated.
>>
>> Thanks!
>>
>>

>
> it looks like the queries in your file aren't all formatted/escaped
> properly, and that you have a syntax error near that line. open up the
> file and see what it is! early guess is that your apostrophes aren't
> escaped... ie: 'lobster' vs \'lobster\'
>


you might be better off if you export to a csv file and then import that
to mysql.
  Réponse avec citation
Vieux 26/10/2007, 13h24   #4
jackal_on_work@yahoo.com
Aucun Avatar
 
Messages: n/a
Hébergeur:
Par défaut Re: Import .sql file into MySQL

On Oct 25, 6:47 pm, "kristincollin...@gmail.com"
<kristincollin...@gmail.com> wrote:
> I have a SQL Enterprise database that I need to import into a MySQL
> database. I generated a .sql file using the SQL Enterprise generate
> script tool, and when I try to import the file. I get the following
> error.
>
> ERROR 1064 (42000) at line 1: 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 'IF EXISTS (SELECT name FROM
> master.dbo.sysdatabases WHERE name = N'lobster')
> DR' at line 1
> "
>
> Any is appreciated.
>
> Thanks!


Hi,
In MySQL we dont have the master system database, which is present
in SQL Server. So its quite obvious that any reference to these
databases in the script would cause the script to fail.
I still doubt as to why the script are failing. Are you simply
transfering data or are you also creating the tables from the script
onn your target database. In case of scripts that do just DML, there
shoudl not be any problems.
Hope this s.

Regards
Jackal

  Réponse avec citation
Réponse


Outils de la discussion

Règles de messages
Vous ne pouvez pas créer de nouvelles discussions
Vous ne pouvez pas envoyer des réponses
Vous ne pouvez pas envoyer des pièces jointes
Vous ne pouvez pas modifier vos messages

Les balises BB sont activées : oui
Les smileys sont activés : oui
La balise [IMG] est activée : oui
Le code HTML peut être employé : non
Trackbacks are oui
Pingbacks are oui
Refbacks are oui


Fuseau horaire GMT +1. Il est actuellement 17h52.


Édité par : vBulletin® version 3.7.3
Copyright ©2000 - 2008, Jelsoft Enterprises Ltd.
Search Engine Friendly URLs by vBSEO 3.2.0 RC5 Tous droits réservés.
Version française #16 par l'association vBulletin francophone
PHWinfo est un site Éducation Sans Frontières ©2000-2008
Ad Management by RedTyger
©Tous droits réservés par les parties respectives
Page generated in 0,11591 seconds with 12 queries