Is there a good tool for ensuring that an SQL query is valid ANSI SQL, and optionally what DBMSs will fail to interpret it? I've found http://developer.mimer.com/validator but I was wondering whether there is a command line tool, preferably open source.
Here is a SQL Library that can help you to do vendor-specific offline SQL syntax check via command line, both Java and .NET demo were available.