Re: converting MS SQL to MySQL

2003-02-10 Thread Barry C. Hawkins
Scott,
Try using single quotes for the values in your INSERT statement.

$sSql = "INSERT INTO contacts (first_,last_ ) VALUES 
('$first_','$last_')";

Quoted identifiers is a setting usually enabled for SQL Server 
connections, and so it thinks you are indicating an attribute (column) 
of an entity (table) and therefore fails.  At least that's my best 
guess for now.

Regards,

> Barry
> 
> I have had a crack at alering a php script written for a mysql 
database but
> instead I want it into a MS SQl database. I though am getting a 
unexplained
> T_variable.
> 
> This is what I have got:-
> 
>  $hostname = "database";
> $username = "login";
> $password = "password";
> $dbName = "database";
> 
> MSSQL_CONNECT($hostname,$username,$password);
> mssql_select_db($dbName) or DIE("Table unavailable");
> 
> $sSql = "INSERT INTO contacts (first_,last_ ) VALUES 
("$first_","$last_")";
> 
> $pResult = mssql_query($sSql, $g_pDBServer);
> print  "Data submitted to database!
> first_: $first_
> last_: $last_";
> 
> // Close the database connection
> mssql_close();
> ?>
> 
> 
> Each time I run it though I am getting
> Parse error: parse error, unexpected T_VARIABLE in 
C:\Intranet\Intranet -
> Main Folder\access.php on line 10
> 
> Been looking in google and php.nt - and so far coming up a blank - 
can u
> help put me on the right track.
> 
> Scott
> 
> 
> - Original Message -
> From: "Barry C. Hawkins" <[EMAIL PROTECTED]>
> To: "Hawk" <[EMAIL PROTECTED]>
> Cc: <[EMAIL PROTECTED]>
> Sent: Saturday, February 08, 2003 2:33 PM
> Subject: Re: converting MS SQL to MySQL
> 
> 
> > 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

Re: converting MS SQL to MySQL

2003-02-10 Thread Barry C . Hawkins
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  
[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




Re: converting MS SQL to MySQL

2003-02-09 Thread Veysel Harun Sahin
Take look at http://www.mysql.com/doc/en/CREATE_TABLE.html

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


--
Your favorite stores, helpful shopping tools and great gift ideas. 
Experience the convenience of buying online with Shop@Netscape! 
http://shopnow.netscape.com/



-
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



Re: converting MS SQL to MySQL

2003-02-09 Thread mysql-list-bot
Hawk <[EMAIL PROTECTED]>,

Do you think the following links may help?

* http://www.mysql.com/doc/en/Using_mSQL_tools.html
* http://www.mysql.com/doc/en/Using_InnoDB_tables.html

This was an automated response to your email 'converting MS SQL to MySQL'.
Final search keyword used to query the manual was 'converting MS SQL to'.

Feedbacks, suggestions and complaints about me should be 
directed to [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




Re: converting MS SQL to MySQL

2003-02-09 Thread Bob Hall
On Thu, Feb 06, 2003 at 10:03:18AM -0500, 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.

MS SQL could refer to either Jet SQL or SQL Server SQL, but the SQL 
below is obviously SQL Server. So the database was created with SQL 
Server.

The GO statements are not SQL. They are used by SQL Server utilities to 
mark the end of a batch. I don't think they're used by anything other 
than MS SQL Server utilities and the equivalent Sybase utilites. But 
regardless, GO isn't used by any MySQL utilities.

Every DBMS uses its own dialect of SQL. When you switch from one DBMS 
(SQL Server) to another (MySQL), you will have to look up the syntax 
of the statements that don't run and learn how to rewrite them in the 
new SQL dialect. The best place to start looking for info is the on-line 
manual at www.mysql.com. 

Good luck, and have fun.

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

-
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




Re: converting MS SQL to MySQL

2003-02-09 Thread Insanely Great
The best way is to import data from MS SQL Server to MySQL. SQLyog at
http://www.webyog.com/sqlyog/download.html has a DTS like ODBC Wizard.

Try it out and all you data will be imported.

Insane

- Original Message -
From: "Hawk" <[EMAIL PROTECTED]>
To: <[EMAIL PROTECTED]>
Sent: Thursday, February 06, 2003 8:33 PM
Subject: converting MS SQL to MySQL


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


-
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




RE: converting MS SQL to MySQL

2003-02-09 Thread Hawk
At 04:13 PM 2/7/2003 +, you wrote:

We sell a data converter for this purpose check out www.bpenet.net




I'm not concern about transferring the data.  I was having problems 
creating the indexes.

thanks for the reply...


Michael Johnson
Managing Director
Humphrey Consulting Limited BPEnet
Tel/Fax: 0870 922 0247
email: [EMAIL PROTECTED]
websites: www.humphreyconsulting.co.uk & www.bpenet.net


-Original Message-
From: Hawk [mailto:[EMAIL PROTECTED]]
Sent: 06 February 2003 3:03 PM
To: [EMAIL PROTECTED]
Subject: converting MS SQL to MySQL



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

---
[This E-mail scanned for viruses by friend.ly.net.]


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




RE: converting MS SQL to MySQL

2003-02-09 Thread Cal Evans
check the docs at www.mysql.com for the CORRECT command to create indexes.
=C=

* Cal Evans
* Stay plugged into your audience.
* http://www.christianperformer.com


-Original Message-
From: Hawk [mailto:[EMAIL PROTECTED]]
Sent: Thursday, February 06, 2003 9:03 AM
To: [EMAIL PROTECTED]
Subject: converting MS SQL to MySQL




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



-
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




Re: converting MS SQL to MySQL

2003-02-09 Thread mysql-list
Hi Hawk <[EMAIL PROTECTED]>,

I'm not sure if you have checked the manual yet, but following
links seem to be somewhat related to your query:

* http://www.mysql.com/doc/en/Using_mSQL_tools.html
* http://www.mysql.com/doc/en/Using_InnoDB_tables.html

This was an automated response to your email 'converting MS SQL to MySQL'.
Final search keyword used to query the manual was 'converting MS SQL'.

Comming soon...
  * Support for querying mysql archives for related discussions.


Feedbacks, suggestions and complaints should be directed to 
[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




converting MS SQL to MySQL

2003-02-08 Thread Hawk


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



converting MS SQL to MySQL

2003-02-07 Thread Hawk


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