Overview
When using an InterSystems Caché connection, a SQL query may fail if the statement ends with a semicolon (;). This issue does not affect InterSystems IRIS connections.
Symptoms
The query fails to run and may return the following Caché SQL error:
SQLCODE -25: Input encountered after end of query.
For example, the following query may fail:
SELECT * FROM SQLUser.Customer;
Cause
Caché Dynamic SQL processes the supplied query as a single SQL statement rather than a SQL script. The trailing semicolon is treated as additional input after the statement, resulting in SQLCODE -25.
In earlier versions of VDM, a query could appear to work when blank lines or carriage returns followed the semicolon. This was caused by inconsistent, whitespace-dependent handling in the legacy Caché driver.
Beginning with VDM 2026, unnecessary trailing whitespace and blank lines are removed before the query is sent to the database. As a result, the Caché driver now receives the trailing semicolon directly and rejects the query consistently.
Resolution
Remove the trailing semicolon from the SQL statement.
Change:
SELECT * FROM SQLUser.Customer;
To:
SELECT * FROM SQLUser.Customer
Save the view and run the query again.
Additional Information
This behavior is specific to connections using the legacy InterSystems Caché driver. InterSystems IRIS connections accept or normalize trailing semicolons and are not affected by this issue.
Comments
0 comments
Please sign in to leave a comment.