Informix Error -8125: The keyword END was found more than once inside the SELECT section. Within the SELECT section, use semicolons to separate SQL statements. Use the keyword END only after the final SELECT.
Cause and resolution
The keyword END was found more than once inside the SELECT section. Within the SELECT section, use semicolons to separate SQL statements. Use the keyword END only after the final SELECT.
Review the contents of the SELECT section to make sure that each SELECT statement except the last one ends in a semicolon and that the last one is followed by an END statement. Perhaps you omitted the FORMAT statement at the beginning of that section.
Oninit® Troubleshooting Guidance
Reasons / Common Causes
-8125 fires when END appears more than once inside the SELECT section — per the official
guidance, multiple SELECT statements must be separated by semicolons, with END used only
after the final one.
ENDused after more than oneSELECTstatement, per the official guidance — the direct, only cause.- A missing
FORMATstatement at the beginning of the section, per the official guidance — a specific, named contributing scenario.
Solutions / Resolution
- Make sure each
SELECTstatement except the last ends in a semicolon, and only the last is followed byEND, per the official guidance. - Check whether the
FORMATstatement was omitted at the beginning of the section, per the official guidance.
Examples
Multiple SELECT statements with a misplaced END
SELECT * FROM orders
END
SELECT * FROM customers
END
-- -8125: END appears twice
Corrected
SELECT * FROM orders;
SELECT * FROM customers
END
Diagnostic Checks
- Check the
SELECTsection for semicolons separating each statement, and confirmENDappears only once, after the finalSELECT.
Related Errors / Related Topics
No closely related error codes are cross-referenced for -8125 in this set yet.
END appears more than once in the SELECT section — separate SELECT statements with
semicolons and use END only after the last one.