Skip to content

ODBC SQL Parser Support in GSP

Explore the ODBC SQL Parser product page

ODBC SQL is the vendor-neutral SQL grammar defined by the ODBC specification, best known for its escape-sequence syntax — {fn ...} scalar functions, {d '...'} / {t '...'} / {ts '...'} date-time literals, {call ...} procedure invocations, and {oj ...} outer joins — that ODBC drivers translate into native SQL.

General SQL Parser (GSP) includes a dedicated ODBC grammar, so SQL written against ODBC drivers can be parsed into a full AST, validated offline, and formatted without connecting to any database. This is useful when analyzing application code that targets multiple backends through a single ODBC layer.

See the ODBC Keyword Compatibility Reference for keyword handling details.

Syntax Coverage Corpus

GSP tests ODBC syntax against 22 documented constructs grouped into 8 categories, each cross-referenced to the documentation that defines it (15 distinct source pages).

Parse coverage

Measured against GSP Java 4.1.11 on 2026-08-10 (UTC) (artifact sha256 71895b6e5ab0). Each construct below carries the complete set of examples from the ODBC documentation; a construct counts as fully covered only when every one of its examples parses. Percentages are pass rates over this documented-example corpus — not a percentage of the entire SQL dialect.

Constructs fully parsed Individual statements parsed
All constructs 19 of 22 (86%) 61 of 68 (90%)
SELECT (queries) 14 of 15 (93%) 41 of 42 (98%)
DML (INSERT / UPDATE / DELETE / MERGE) 7 of 8 (88%) 15 of 16 (94%)
Stored procedures

Statements are split using the parser's own statement splitter, so multi-statement examples and procedure bodies are counted correctly. The SELECT, DML and stored-procedure rows classify each statement by its parsed statement type: a construct is counted in a row when its examples contain at least one statement of that class, and is fully parsed when all of them parse. Stored procedures covers CREATE PROCEDURE / FUNCTION / PACKAGE / TRIGGER definitions and anonymous blocks.

Machine-readable: dialect data (JSON) · all-dialect matrix · coverage matrix overview

All 22 constructs

Construct Category Parses Specified in
ESCAPE PROCEDURE CALL CALL 2 of 4 Microsoft docs
ESCAPE PROCEDURE CALL RETURN CALL 0 of 3 Microsoft docs
CREATE TABLE CREATE all 2 Microsoft docs
DELETE DELETE all 2 Microsoft docs
PARAMETER MARKERS DML all 4 Microsoft docs
DROP TABLE DROP all 1 Microsoft docs
INSERT INSERT all 3 Microsoft docs
ESCAPE CONVERT FUNCTION SELECT 2 of 4 Microsoft docs
ESCAPE DATE LITERAL SELECT all 3 Microsoft docs
ESCAPE INTERVAL LITERAL SELECT all 4 Microsoft docs
ESCAPE LIKE PREDICATE SELECT all 2 Microsoft docs
ESCAPE NUMERIC FUNCTIONS SELECT all 5 Microsoft docs
ESCAPE OUTER JOIN SELECT all 3 Microsoft docs
ESCAPE OUTER JOIN NESTED SELECT all 2 Microsoft docs
ESCAPE SCALAR FUNCTION SELECT all 2 Microsoft docs
ESCAPE STRING FUNCTIONS SELECT all 5 Microsoft docs
ESCAPE TIME LITERAL SELECT all 2 Microsoft docs
ESCAPE TIMEDATE FUNCTIONS SELECT all 5 Microsoft docs
ESCAPE TIMESTAMP LITERAL SELECT all 2 Microsoft docs
SELECT SELECT all 4 Microsoft docs
SELECT_GROUP_BY SELECT all 3 Microsoft docs
UPDATE UPDATE all 3 Microsoft docs