.Net SQL Parser

I had a requirement to parse SQL string, in particular with CONTAINS(column_list) and modify SELECT column list.
I've found two most promising implementations General SQL Parser from   http://www.sqlparser.com/  and SharpHSQL from http://www.c-sharpcorner.com/database/SharpHSQL.asp article.
General SQL Parser has quite qood API, but it doesn't have open source and doesn't recognize contains with column_list.

SharpHSQL is a early C# port of the HSQL Database Engine which has a source code, but also doesn't  recognize CONTAINS(column_list) and additionally doesn't re-construct SQL from previously parsed SQL string. I've tried to add the functionality that I wanted,but it wasn't easy.

Finally I gave up with SharpHSQL code and used a few RegEx pattern to modify SQL  as I needed. Unfortunately the code is not bullet-prove and will not work if sub-queries will be used in SELECT columns list.

Recently I  was pointed to GOLD Parser Engine, which I didn't research yet.

posted @ Saturday, August 12, 2006 3:36 PM

Print

Comments on this entry:

# re: .Net SQL Parser

Left by James at 9/22/2006 2:37 PM
Gravatar
The new version support CONTAINS now, you may
have a try here:
http://www.sqlparser.com

Your comment:



 (will not be displayed)


 
 
 
Please add 7 and 6 and type the answer here:
 

Live Comment Preview:

 
«August»
SunMonTueWedThuFriSat
272829303112
3456789
10111213141516
17181920212223
24252627282930
31123456