SQL query parsing in vb.net

2019-09-03 16:54发布

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?

3条回答
可以哭但决不认输i
2楼-- · 2019-09-03 16:58

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.

查看更多
\"骚年 ilove
3楼-- · 2019-09-03 17:03

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.
查看更多
Fickle 薄情
4楼-- · 2019-09-03 17:03

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.

查看更多
登录 后发表回答