Hi.
On Sun, Apr 01, 2001 at 03:30:48AM -0400, [EMAIL PROTECTED] wrote:
> I have a SQL file that I generated on MS SQL 7. The file looks like this (a
>portion):
>
> CREATE TABLE [dbo].[Articles] (
> [ArticleID] [int] IDENTITY (1, 1) NOT NULL ,
> [Title] [char] (100) NOT NULL ,
[...]
>
> I am using phpMyAdmin and attempting to run the SQL query on the database that has
>already been created. I get the error: MySQL said: You have an error in your SQL
>syntax near '[dbo].[Articles] ( [ArticleID] [int] IDENTITY (1, 1) NOT NULL , [Title]
>[cha' at line 1
>
> What is the syntax problem that I am missing?
These brackets [] are not allowed in the context. Try something like
CREATE TABLE dbo.Articles (
ArticleID int IDENTITY (1, 1) NOT NULL ,
Title char (100) NOT NULL ,
Next problem is IDENTITY is not known by MySQL. I assume it means
something like PRIMARY KEY AUTO_INCREMENT, and so on...
Summary: Don't use MS SQL dumps, when Standard SQL dumps are needed.
> And can I make MS SQL output the sql file in the correct way?
Sorry, I never used MS SQL, I have to leave that open to someone else.
Bye,
Benjamin.
---------------------------------------------------------------------
Before posting, please check:
http://www.mysql.com/manual.php (the manual)
http://lists.mysql.com/ (the list archive)
To request this thread, e-mail <[EMAIL PROTECTED]>
To unsubscribe, e-mail <[EMAIL PROTECTED]>
Trouble unsubscribing? Try: http://lists.mysql.com/php/unsubscribe.php