// SQL Server error reference

SQL Server error 4104: Multi-part identifier not bound

A reference like t.Column or Table.Column names a table or alias that isn't in scope at that point of the query, often after aliasing a table.

Error number
4104
Severity
16
Category
Names and objects
Error message
The multi-part identifier "%.*ls" could not be bound.

What it means

A multi-part identifier is a column reference with a prefix, such as o.OrderId or dbo.Orders.OrderId. SQL Server raises 4104 when the prefix doesn't match any table name or alias visible in that part of the query.

Common causes

  • The table was given an alias, but the query still uses the full table name (FROM dbo.Orders o ... WHERE Orders.Id = 1). Once aliased, only the alias works.
  • A typo in the alias.
  • Referring to a table from an outer query or another join in a place it isn't visible, for example in an ON clause before that table is joined.
  • In an UPDATE ... FROM or DELETE ... FROM, using a name that isn't in the FROM clause.

How to fix it

  1. Use the alias consistently once you've defined it.

    SELECT o.OrderId, c.Name
    FROM dbo.Orders AS o
    JOIN dbo.Customers AS c ON c.CustomerId = o.CustomerId
    WHERE o.OrderDate >= '2025-01-01';
  2. Order joins so each ON clause only refers to tables already joined.

    SELECT *
    FROM dbo.A AS a
    JOIN dbo.B AS b ON b.AId = a.Id
    JOIN dbo.C AS c ON c.BId = b.Id;
  3. In UPDATE ... FROM, update through the alias.

    UPDATE o SET o.Status = 'shipped'
    FROM dbo.Orders AS o
    JOIN dbo.Shipments AS s ON s.OrderId = o.OrderId;

Reproduce it safely

SELECT Orders.OrderId FROM (VALUES (1)) AS o(OrderId);  -- Msg 4104

Related errors

More names and objects errors

The code and message text are from the Microsoft Database Engine events and errors reference. Browse the full SQL Server error list or search every database error.

// fewer errors, faster fixes

Work on SQL Server in SQLly

A native SQL client for macOS, Windows and Linux with schema-aware IntelliSense, guardrails for risky statements and clear error messages, for SQL Server and the other databases you use.