Informix Error -2932: Formats may be specified only for float, smallfloat, decimal, or date columns.
Cause and resolution
Formats may be specified only for float, smallfloat, decimal, or date columns.
This attribute statement specifies a FORMAT string, but the data type of the field is not one of the four that support formatting: FLOAT, SMALLFLOAT, DECIMAL (or MONEY), and DATE. If this column is not DISPLAYONLY, check that it has been associated with the right column and that the column is defined in the database as you expected.
Oninit® Troubleshooting Guidance
Reasons / Common Causes
-2932 fires when a FORMAT clause is applied to a field whose data type doesn't support
formatting — per the official guidance, only FLOAT, SMALLFLOAT, DECIMAL (or MONEY), and
DATE support the FORMAT attribute.
- A
FORMATclause applied to a field of an unsupported data type (e.g.CHAR,INTEGER,SERIAL), per the official guidance — the direct, only cause.
Solutions / Resolution
- If the field isn't
DISPLAYONLY, check that it's associated with the right column, per the official guidance, and that the column is defined in the database as expected. - Remove the
FORMATclause if the field's data type genuinely doesn't support it.
Examples
FORMAT on an unsupported type
ATTRIBUTES
quantity = order_qty, FORMAT = "###.##";
-- -2932: order_qty is INTEGER, which doesn't support FORMAT
Corrected
ATTRIBUTES
unit_price = unit_price, FORMAT = "###.##";
-- unit_price is DECIMAL, which does support FORMAT
Diagnostic Checks
- Check the actual data type of any field carrying a
FORMATclause, and confirm it'sFLOAT,SMALLFLOAT,DECIMAL/MONEY, orDATE.
Related Errors / Related Topics
- -2931 — "There is an error in the format specification." A related
FORMAT-clause error, about a malformed format string on a supported type rather thanFORMATapplied to an unsupported type.
FORMAT is applied to a field whose data type doesn't support it — remove the clause or check
that the field is associated with the intended column.