Informix Error -26176: Cannot use SAMEAS for FIXED format tables.
Cause and resolution
Cannot use SAMEAS for FIXED format tables.
The CREATE EXTERNAL TABLE statement does not allow the SAMEAS keyword for FIXED format tables. The column entries must also define an external type to describe how to access the data in the fixed file.
Revise the CREATE EXTERNAL TABLE statement to enumerate the column information and reissue the statement.
Oninit® Troubleshooting Guidance
Reasons / Common Causes
-26176 fires when SAMEAS is used with a FIXED-format CREATE EXTERNAL TABLE
statement — per the official guidance.
SAMEASused for aFIXED-format external table, per the official guidance — the direct, only cause;FIXEDformat requires enumerated column definitions (each with an external type) instead.
Solutions / Resolution
- Enumerate the column information explicitly, including each column's external
type, per the official guidance, instead of using
SAMEAS.
Examples
SAMEAS on a FIXED table
CREATE EXTERNAL TABLE ext_tab SAMEAS orders
USING (FORMAT 'FIXED', DATAFILES ("DISK:/data/orders.fix"), ...);
-- -26176: SAMEAS not allowed for FIXED format
Corrected
CREATE EXTERNAL TABLE ext_tab (order_id CHAR(10), total CHAR(12))
USING (FORMAT 'FIXED', DATAFILES ("DISK:/data/orders.fix"), ...);
Diagnostic Checks
- Check whether the external table uses
FORMAT 'FIXED'andSAMEAStogether, and replaceSAMEASwith an explicit column list.
Related Errors / Related Topics
- -26178 — "Incorrect external column type column-name." A related
FIXED-format column-definition error, on an invalid external type rather than usingSAMEAS. - -26180 — "Missing external column type column-name." A related
FIXED-format column-definition error, on a missing external type rather than usingSAMEAS.
SAMEAS was used on a FIXED-format external table — enumerate the columns explicitly
instead.