Informix Error -2977
-2977 Table table1 cannot be a master of table table2 because
they do not join.The two tables that are named in a MASTER OF instruction must be joined. A join between tables is expressed by naming columns from both tables in one statement in the ATTRIBUTES section. Check the spelling of the table names here, and review the attribute statements.
Oninit® Troubleshooting Guidance
Reasons / Common Causes
-2977 fires when a MASTER OF instruction names two tables that aren't joined — per the
official guidance, a join between tables is expressed by naming columns from both tables in one
ATTRIBUTES statement, and the two tables in MASTER OF must be joined that way.
- The two tables named in
MASTER OFhave no join expressed inATTRIBUTES, per the official guidance — the direct, only cause.
Solutions / Resolution
- Check the spelling of the table names, per the official guidance.
- Review the attribute statements to confirm a join exists between the two tables, per the official guidance, adding one if it's missing.
Examples
A MASTER OF pair with no join defined
INSTRUCTIONS
orders MASTER OF item
END
-- -2977: no ATTRIBUTES statement joins orders and item
Corrected
ATTRIBUTES
order_id = orders.order_id, item.order_id;
INSTRUCTIONS
orders MASTER OF item
END
Diagnostic Checks
- Check the spelling of both table names in
MASTER OF, and confirmATTRIBUTESexpresses a join between them.
Related Errors / Related Topics
- -2862 — "The table table-name cannot be found in the database." A related table-reference error, about a table not existing at all rather than two tables failing to join.
- -2864 — "The table table-name is not among the specified tables." A related
table-reference error, about a table missing from
TABLESrather than two tables failing to join.
MASTER OF names two tables with no join between them in ATTRIBUTES — add a join, or check
the table name spellings.