Hawk,
While your script is fairly straightforward in terms of SQL syntax, Transact-SQL and MySQL's dialect of SQL are different enough that you will have to modify some things. Here's a link to the CREATE INDEX syntax page of the online MySQL manual:

http://www.mysql.com/doc/en/CREATE_INDEX.html

It could be as simple as placing a space between the table name and columns list. What sort of errors are you getting? Have you tried creating an index with the command-line utility to see if you can get more information on the issue? Also, what version of MySQL are you running? The manual states that prior to 3.22 this statement did nothing. Most folks are on 3.23.5x, but it never hurts to check.

Regards,



On Thursday, February 6, 2003, at 05:57 PM, Hawk wrote:



Hi,

I am new to SQL. I am attempting to create a database that was created in MS SQL to MySQL. The below SQL statements works with MS SQL.

I am executing the following:

CREATE TABLE 'Accounting'(
'Username' VARCHAR(254) NULL,
'CallerID' VARCHAR(128) NULL,
'Addr' VARCHAR(128) NULL,
'NAS' VARCHAR(128) NULL,
'Port' VARCHAR(128) NULL,
'Start' DATETIME NULL,
'Stop' DATETIME NULL,
'SessionTime' INTEGER DEFAULT 0,
'ExtraTime' INTEGER DEFAULT 0,
'TimeLeft' INTEGER DEFAULT 0,
'KBytesIn' INTEGER DEFAULT 0,
'KBytesOut' INTEGER DEFAULT 0,
'SessionKB' INTEGER DEFAULT 0,
'ExtraKB' INTEGER DEFAULT 0,
'KBytesLeft' INTEGER DEFAULT 0,
)
GO

CREATE INDEX IX_Username ON Accounting(Username) <---- MySQL will not take this command
GO

CREATE TABLE 'ActiveUsers'(
'UserID' VARCHAR(254) PRIMARY KEY,
'NAS' VARCHAR(128) NULL,
'Port' VARCHAR(128) NULL,
'Username' VARCHAR(254) NULL,
'CallerID' VARCHAR(128) NULL,
'Address' VARCHAR(128) NULL,
'LoginTime' DATETIME NULL,
)
GO

CREATE TABLE 'TAC_GRP'(
'TAC_ID' VARCHAR(254) NOT NULL,
'TAC_Attr' VARCHAR(64) NOT NULL,
'TAC_Val' TEXT NULL
)
GO

CREATE UNIQUE INDEX IX_TAC_ID ON TAC_GRP(TAC_ID, TAC_Attr) <---- MySQL will not take this command
GO

CREATE TABLE 'TAC_USR'(
'TAC_ID' VARCHAR(254) NOT NULL,
'TAC_Attr' VARCHAR(64) NOT NULL,
'TAC_Val' TEXT NULL
)
GO

CREATE UNIQUE INDEX IX_TAC_ID ON TAC_USR(TAC_ID, TAC_Attr) <---- MySQL will not take this command
GO


Thanks in advance.
---
[This E-mail scanned for viruses by Friend.ly.net.]


---------------------------------------------------------------------
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 <mysql-unsubscribe-> [EMAIL PROTECTED]>
Trouble unsubscribing? Try: http://lists.mysql.com/php/unsubscribe.php




--
Barry C. Hawkins
Systems Consultant
All Things Computed
404-795-9147 voice/fax
[EMAIL PROTECTED]


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

Reply via email to