Informix Error -22209: No hyphen allowed in SQL object identifier, cursor name, or statement id.
Cause and resolution
No hyphen allowed in SQL object identifier, cursor name, or statement id.
You must change the name of the object identifier, cursor, or statement ID so that it does not contain a hyphen.
Oninit® Troubleshooting Guidance
Reasons / Common Causes
-22209 fires when an SQL object identifier, cursor name, or statement ID contains a hyphen — per the official guidance, hyphens aren't allowed in these names.
- A hyphen used in an SQL object identifier, cursor name, or statement ID, per the official guidance — the direct, only cause.
Solutions / Resolution
- Change the name so it doesn't contain a hyphen, per the official guidance.
Examples
A hyphenated cursor name
DECLARE my-cursor CURSOR FOR ...
-- -22209: hyphens aren't allowed
Corrected
DECLARE my_cursor CURSOR FOR ...
Diagnostic Checks
- Check the flagged identifier/cursor/statement name for a hyphen, and replace it (e.g. with an underscore).
Related Errors / Related Topics
No closely related error codes are cross-referenced for -22209 in this set yet.
An SQL object identifier, cursor name, or statement ID contained a hyphen — remove it.