Informix Error -220
-220 There is no FROM clause in the query.
Every SELECT statement must include a FROM clause to name the table or tables that it queries. Check that FROM was spelled and that no extra semicolon ends the statement prematurely. To select only a constant, or to select the only value of a function that is unrelated to any table (such as USER or TODAY), you nevertheless have to name a table. You can select a known row from a system catalog, as in this example.
SELECT 'today is', TODAY, 'and I am', USER FROM systables WHERE tabid = 100
The tabid value of the first user-defined table in a database is always 100, so this query always returns exactly one row if any tables are defined. (Version 4.1 and later produce syntax error -201 when the FROM clause is missing.)
-220 Cannot begin savepoint.
Version 4.1 and later can detect this internal error. If the error recurs, note all circumstances and contact IBM Informix Technical Support.
Oninit® Troubleshooting Guidance
Reasons / Common Causes
-220 covers two entirely unrelated conditions sharing the same code — and one of them is itself partly historical, per the official text's own note.
Scenario A: a missing FROM clause (largely superseded).
- A
SELECTstatement missing itsFROMclause entirely. EverySELECTneeds one, even to select only a constant or a table-unrelated function value (USER,TODAY). - The official text notes this is version-dependent: "Version 4.1 and later produce syntax
error -201 when the FROM clause is missing" — meaning on any current version, this specific
mistake actually surfaces as -201, not -220. Seeing -220 for a missing
FROMclause would itself suggest a very old version.
Scenario B: "Cannot begin savepoint" (current, rare, internal).
- An internal condition around transaction savepoint handling, detectable since Version 4.1 — the official text frames this as something to escalate if it recurs, not something with a documented self-service fix.
Solutions / Resolution
For the FROM-clause scenario (on any current version, watch for -201 instead):
- Add a
FROMclause. For a constant-only or function-only select with no natural table to query, use a known-single-row trick against the system catalog:
TheSELECT 'today is', TODAY, 'and I am', USER FROM systables WHERE tabid = 100;tabidof the first user-defined table in a database is always 100, so this returns exactly one row whenever any tables are defined.
For the savepoint scenario:
- If this recurs, note all circumstances and contact IBM Informix Technical Support, per the official guidance — this is an internal condition without an established self-service fix.
Examples
The FROM-clause trick
SELECT USER, TODAY FROM systables WHERE tabid = 100;
A reliable way to select constants or table-unrelated function values without naming a "real" table specific to the query's actual purpose.
Confirming which scenario applies
-- If -220 appears for what looks like a missing FROM clause on a
-- current, supported version, that's unexpected — current versions
-- should report -201 for this instead. Confirm the actual server
-- version before assuming this is the FROM-clause scenario.
Diagnostic Checks
- Determine which of the two scenarios actually applies — a missing
FROMclause in aSELECT, versus a savepoint-related operation — since the fix is completely different. - Check the actual server version in use if there's any confusion about whether this or
-201 should apply for a missing
FROMclause. - For the savepoint case, gather full circumstances for escalation if it recurs.
Related Errors / Related Topics
- -201 — "A syntax error has occurred." The official text explicitly names this as what a
missing
FROMclause produces on Version 4.1 and later — effectively -220's successor for that specific scenario.
If you're troubleshooting a missing FROM clause on a current version and see -220 instead of
-201, that's itself worth double-checking the server version over — the official text is explicit
that current versions should report -201 for this case.