How to check SQL for authenticity from the command line?

Is there a good tool to ensure that a SQL query is valid ANSI SQL and perhaps which DBMSs will not be able to interpret it? I found http://developer.mimer.com/validator , but I was wondering if there is a command line tool, preferably open source.

+7
command-line sql validation ansi-sql
Dec 30 '09 at 10:48
source share
2 answers

Here is the SQL Library to help you do vendor-specific SQL syntax checking offline through the command line, both Java and .NET were available.

+1
Jan 08 2018-12-12T00: 00Z
source share

Perhaps a parser / generator like ANTLR or JavaCC has an ANSI SQL 92 grammar already built. If so, you can run the parser / generator, build the classes that go out, and Bob your uncle.

I see that ANTLR has one based on Oracle PL / SQL. Maybe this can help you. ANTLR is a terrific tool worth knowing.

+1
Dec 30 '09 at 14:07
source share



All Articles