Hi, where can I download (to test or for free) a SQL parser for Java? I am testing with a Java application to intercept and rewrite queries from the application to the database for some legacy Java applications and need a parser to do the work. I am looking to find source code for such a parser that I could include/compile when I recompile my JTDS source. Or I would like to find a previously-built DLL or executable that I could call from within my JTDS source.

In terms of functionality, I need to parse a string containing a SQL statement, obtain the tokens/values within the string, modify those tokens/values, and rebuild the SQL statement and send it to the database for processing.

Searching online, I do not find many such utilities. Either the functionality mentioned above is missing or the very few DLLs I've seen are not for Java.

Thank you for any thoughts.