views:

45

answers:

4

Is there an easy way to convert Transact-SQL to MySQL?


I am attempting to convert a DB archive of stock ticker symbols and company names.

A: 

What are you trying to convert? Procedures? Statements? Please be more clear about it.

VexXtreme
+7  A: 

The short answer: NO

The medium answer: MAYBE

The long answer: That depends on what's in your TSQL and how much time and effort you want to put into it.

TSQL is not a subset of MySQL's dialect. So there exists some TSQL for which there is no MySQL conversion. However, the overlap between the two languages is pretty significant, and to a certain degree the conversion is just a matter of syntax.

This isn't a new problem, and some people have tried to tackle it. A quick google search for "tsql to mysql" yields some promising results, notably this project here, which attempts to convert stored procedures from TSQL to MySQL:

http://sourceforge.net/projects/tsql2mysql/

This probably won't solve your problem completely, but it's at least a start.

tylerl
A: 

Are the others say, it depends how long your particular piece of string is.

But, I would suggest that you do NOT want to convert Transact-SQL to MySQL.

If you think about it, I think that you will find that you want to convert it to ODBC.

And then next year, when the company wants you to move it to Oracle, or Access ...

Mawg