Please start any new threads on our new site at https://forums.sqlteam.com. We've got lots of great SQL Server experts to answer whatever question you can come up with.

 All Forums
 SQL Server 2000 Forums
 Import/Export (DTS) and Replication (2000)
 Converting MySQL script to SQL Server script

Author  Topic 

wgraves
Starting Member

4 Posts

Posted - 2004-10-26 : 10:57:53
Hi there,

I have a few MySQL scripts that I need to run in SQL Server. However the syntax is just slightly different and I was wondering if there is a tool out there that can quickly convert these scripts so that they will work with SQL Server?

Anyone have any ideas (other than manually converting them)?

Thanks,

Wes

robvolk
Most Valuable Yak

15732 Posts

Posted - 2004-10-26 : 19:26:29
I think it's probably better to manually convert them. For one, it's cheaper. Two, it's more educational than some tool that does a conversion for you. You learn something about both products by converting code between them. You don't seem to have a lot of scripts or any that are fairly complex, so it shouldn't be too difficult.

Also, it's likely any tool out there will either completely screw up the conversion, or create SQL that is so generic it doesn't perform well on either or both platforms. Except for the most basic queries there is no way to write SQL that performs well with all dialects of SQL.

I posted an entry in my SQLTeam blog that included a plug for SQL in a Nutshell, which is geared towards people who work with several different SQL products. I'd recommend picking up a copy, it will be a big help in describing the differences between MySQL and SQL Server and make a manual rewrite much easier.
Go to Top of Page
   

- Advertisement -