0

I already searched a lot of resources on the net for parsing. Parsing in integers, parsing in char, parsing in string. However I just can't create a program that will parse a SQL Query and do conversion

For example, MySQL to MsSQL.

Does anybody have some sample query conversion code or relavent links?

Taryn East
  • 27,486
  • 9
  • 86
  • 108
dimlight
  • 3
  • 3

3 Answers3

0

SQL conversion from one database to another is quite complicated, there are lots of things to do such as data type conversion, different syntax of functions, propriety join syntax and stored procedure is much more difficult to convert.

Here are two articles with real demo to do some SQL query conversion.

  1. Rewrite Oracle propriety joins to ANSI SQL compliant joins.
  2. Rewrite SQL Server proprietary joins to ANSI SQL compliant joins.
James Wang
  • 453
  • 4
  • 5
0

Microsoft provides some guidelines for migrating from other databases to their products. You can download documents from their site which will assist you in the necessary conversions for your queries. Migration to Microsoft SQL Server 2008. The guides are word documents that you can download.

Demitrius Nelon
  • 1,210
  • 1
  • 10
  • 29
0

You could use Antlr or a similar tool. There is an almost ready-to-use MySQL grammar for Antlr, see http://www.antlr.org/grammar/list

Adding a vb.net target to Antlr will not be that easy, but I suppose you'd be just fine with an existing C# backend.

SK-logic
  • 9,605
  • 1
  • 23
  • 35