开发者

DB2 SQL Validation

开发者 https://www.devze.com 2023-03-26 05:09 出处:网络
I am looking for something, where I can validate the DB2-SQL Text that I am receiving on Client end. I do not want to make a DB call just to validate SQL Text. Any parser available to va开发者_如何学G

I am looking for something, where I can validate the DB2-SQL Text that I am receiving on Client end. I do not want to make a DB call just to validate SQL Text. Any parser available to va开发者_如何学Golidate DB2 SQL texts ? I am using C#.


You should be able to "prepare" the statement without executing it.

SQL parsers are truly difficult beasts to write and you will never get it 100% right, besides even if you can scan for correct syntax you have no idea what tables and views are currently defined in the target system.

So assuming its just "SELECT" statements you want to check just "PREPARE" them and check for errors, but, don't execute.

0

精彩评论

暂无评论...
验证码 换一张
取 消

关注公众号