flashbangpro Posted September 20, 2012 Share Posted September 20, 2012 I am needing to translate a SQL Server statement to MySQL and I was hoping to find an easy opensource translator that I can paste in the SQL Server statement and it translate it to what the MySQL statement should be or something of that effect. Thank you all in advance. Quote Link to comment Share on other sites More sharing options...
Adam Posted September 20, 2012 Share Posted September 20, 2012 I doubt such a tool exists, and if there is I doubt it's reliable. TL-SQL has features MySQL does not, and vice versa. These go beyond switching one keyword for another, and when you factor in differences in each language across their versions, it's just not feasible. Such a migration requires a developer or DBA to do it manually. Quote Link to comment Share on other sites More sharing options...
Christian F. Posted September 20, 2012 Share Posted September 20, 2012 Alternatively you can use a DBA (Database Abstraction) class, but that would require a rewrite of the source code anyway. The benefit of this however, is that you'll only need to do the code rewrite once, as the DBA class will create the proper SQL sentences and syntax for you. The negative aspect of these is that they tend to implement only a subset of the functionality, or become complicated behemoth like nothing else. It's not all bad though, as the subset tends to be what the vast majority of queries use anyway. I've written one of these classes, so I should know. Unfortunately, I've only got the MySQL component of it, as I'm not familiar enough with the other SQL dialects to write the query builders for them myself (yet). That said, there should be some other DBA classes out there, or some other plugins that might help you automate most of this. Not aware of any tools that translates the queries themselves though, as that's more of a domain of the Database Administrators (Adam's DBAs). Quote Link to comment Share on other sites More sharing options...
PFMaBiSmAd Posted September 20, 2012 Share Posted September 20, 2012 If you post the query(ies) you are having trouble converting yourself, someone can probably lend a hand at converting them. Quote Link to comment Share on other sites More sharing options...
fenway Posted September 21, 2012 Share Posted September 21, 2012 Maybe syntactically you could convert them -- but that's akin to machine translation -- it's terrible. Quote Link to comment Share on other sites More sharing options...
Recommended Posts
Join the conversation
You can post now and register later. If you have an account, sign in now to post with your account.