Home | Contact Us | FAQ | Search & Site Map | Link to Us
Sign In | Join | Other 45 Sites in Network
Home
Discussion Groups
DB Engine
SQL ServerMSDESQL Server CE
Services
Analysis (Data Mining)Analysis (OLAP)DTSIntegration ServicesNotification ServicesReporting Services
Programming
CLRConnectivitySQLXML
Other Technologies
ClusteringEnglish QueryFull-Text SearchReplicationService Broker
General
Data WarehousingPerformanceSecuritySetupSQL Server ToolsOther SQL Server Topics
DirectoryUser Groups
Related Topics
MS AccessOther DB ProductsMS Server Products.NET DevelopmentVB DevelopmentJava DevelopmentMore Topics ...

SQL Server Forum / DB Engine / SQL Server / May 2008

Tip: Looking for answers? Try searching our database.

convert MySQL db to SQL Server, run create and insert queries

Thread view: 
Enable EMail Alerts  Start New Thread
Thread rating: 
Janis Rough - 30 May 2008 21:08 GMT
I am trying to recreate a MySQL db on SQL Server Express.  I have the
create table and inserts imported to the Query Window on SQL Server
Express but I have some errors when I run the query.  My first
question is how to go to  the line numbers in the error messages so I
can fix the problem which I assume is a syntax error from MySQL to SQL
Server syntax.

It first stops on line 15 which is the following create statement:
    CREATE DATABASE `myDatabaseName`
    DEFAULT CHARACTER SET latin1 COLLATE latin1_swedish_ci;
    USE `myDatabaseName`;
I tried it with an without the Default Character Set and I still got
the following error:
Msg 102, Level 15, State 1, Line 15
Incorrect syntax near '`'

It would be great if I didn't have to count the line numbers in the
Query window to see what the error is :-)

Thanks,
Russell Fields - 30 May 2008 22:00 GMT
Janis,

Well, your syntax is invalid.  You need to get rid of the '`' characters.
The database name should not be quoted and it it was a quoted string, it
would not use the character in your script.  (Might this be a script from
Linux, run on Windows problem.)

Also, the DEFAULT CHARACTER SET is not supported and the latin1_swedish_ci
collation is not a SQL Server collation.

Perhaps:
   CREATE DATABASE myDatabaseName
    COLLATE Finnish_Swedish_CI_AS;

If you don't have the SQL Server Books Online you should download them or
review them online.

CREATE DATABASE syntax:
http://technet.microsoft.com/en-us/library/ms176061.aspx

RLF

>I am trying to recreate a MySQL db on SQL Server Express.  I have the
> create table and inserts imported to the Query Window on SQL Server
[quoted text clipped - 16 lines]
>
> Thanks,
Janis Rough - 31 May 2008 01:19 GMT
> Janis,
>
[quoted text clipped - 35 lines]
>
> > Thanks,

I have been struggling with this all day.  Thanks for your response.
Yes this is a MySQL server hosted on Linux.  I will remove all the
quotes around the table names.  I just added another post because I
thought I deleted this one however I did not notice the quotes problem
so I am glad I did not delete the post after all.
 
Sign In
Join
My Latest Posts
My Monitored Threads
My Blog
My Photo Gallery
My Profile
My Homepage

Start New Thread
Enable EMail Alerts
Rate this Thread



©2009 Advenet LLC   Privacy Policy - Terms of Use
This website includes both content owned or controlled by Advenet as well as content owned or controlled by third parties.