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.
精彩评论