Informix Error -4148: CHAR (*) type is not allowed in SQL statements.
Cause and resolution
CHAR (*) type is not allowed in SQL statements.
The CHAR(*) type is not allowed as an SQL type. It cannot be used in CREATE TABLE, ALTER TABLE, and so on.
Oninit® Troubleshooting Guidance
Reasons / Common Causes
-4148 fires when CHAR(*) is used in an SQL statement context — per the official guidance,
CHAR(*) isn't a valid SQL type and can't appear in CREATE TABLE, ALTER TABLE, or similar
statements.
CHAR(*)used in a SQL DDL context, per the official guidance — the direct, only cause.
Solutions / Resolution
- Use an explicit
CHARlength instead ofCHAR(*)in the SQL statement.
Examples
CHAR(*) in a CREATE TABLE
CREATE TABLE orders (order_ref CHAR(*));
-- -4148: CHAR(*) is not a valid SQL type
Corrected
CREATE TABLE orders (order_ref CHAR(30));
Diagnostic Checks
- Check every SQL DDL statement for a
CHAR(*)type, and give it an explicit length instead.
Related Errors / Related Topics
- -4138 — "Arrays of CHAR(*) are not allowed." A related
CHAR(*)restriction, about array element types rather than SQL statement usage.
CHAR(*) is used in an SQL statement, which isn't valid — give it an explicit length instead.