java 1.4 Sql server 2000
i am taking input of sql query (for validation of field value against values retrieved by executing sql query) from admin user which will be
You may need a full SQL Parser to do such a vendor-specific offline SQL syntax check.
Take a look at this demo which including some Java and C# code:
http://www.dpriver.com/blog/list-of-demos-illustrate-how-to-use-general-sql-parser/vendor-specific-offline-sql-syntax-check/