Geeks With Blogs

News My Blog has been MOVED to
Michael Freidgeim's OLD Blog My Blog has been MOVED to

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  and SharpHSQL from 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 on Saturday, August 12, 2006 3:36 PM .Net Framework , SQL Server | Back to top

Comments on this post: .Net SQL Parser

# re: .Net SQL Parser
Requesting Gravatar...
The new version support CONTAINS now, you may
have a try here:
Left by James on Sep 22, 2006 2:37 PM

# re: .Net SQL Parser
Requesting Gravatar...
me parece interezante la herramienta la voy a provar muchas grasias por el aporte se lo garedesco mucho de todo corazon ,bay
Left by jhonny on May 13, 2009 10:39 PM

# re: .Net SQL Parser
Requesting Gravatar...
Thank to
I can understand your comment.
Left by Michael Freidgeim on May 14, 2009 12:18 AM

Your comment:
 (will show your gravatar)

Copyright © Michael Freidgeim | Powered by: