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,
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.