Informix Error -26047: Function (explain_sql) does not support the query provided in (%s). Only a single select statement is supported.
Cause and resolution
Function (explain_sql) does not support the query provided in (%s). Only a single select statement is supported.
Explain_sql only supports a single SELECT statement. Please change your query.
Oninit® Troubleshooting Guidance
Reasons / Common Causes
-26047 fires when explain_sql is given a query that isn't a single SELECT
statement — per the official guidance.
- The provided query isn't a single
SELECTstatement, per the official guidance — the direct, only cause.
Solutions / Resolution
- Change the query so it's a single
SELECTstatement, per the official guidance.
Examples
A non-SELECT query passed to explain_sql
EXECUTE FUNCTION explain_sql('INSERT INTO t1 VALUES (1)');
-- -26047: explain_sql only supports a single SELECT statement
Diagnostic Checks
- Check the query text passed to
explain_sql, and confirm it's a singleSELECTstatement.
Related Errors / Related Topics
- -26050 — "Function (explain_sql) does not support a query with host variables." A
related
explain_sqlquery-support restriction, on host variables within an otherwise valid singleSELECTrather than a non-SELECTstatement.
explain_sql was given a query that isn't a single SELECT statement — provide only a
single SELECT.