Sign Up

Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.

Have an account? Sign In

Have an account? Sign In Now

Sign In

Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.

Sign Up Here

Forgot Password?

Don't have account, Sign Up Here

Forgot Password

Lost your password? Please enter your email address. You will receive a link and will create a new password via email.

Have an account? Sign In Now

You must login to ask a question.

Forgot Password?

Need An Account, Sign Up Here

Please briefly explain why you feel this question should be reported.

Please briefly explain why you feel this answer should be reported.

Please briefly explain why you feel this user should be reported.

Sign InSign Up

The Archive Base

The Archive Base Logo The Archive Base Logo

The Archive Base Navigation

  • SEARCH
  • Home
  • About Us
  • Blog
  • Contact Us
Search
Ask A Question

Mobile menu

Close
Ask a Question
  • Home
  • Add group
  • Groups page
  • Feed
  • User Profile
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Buy Points
  • Users
  • Help
  • Buy Theme
  • SEARCH
Home/ Questions/Q 3843968
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 19, 20262026-05-19T16:00:53+00:00 2026-05-19T16:00:53+00:00

I am running in to the dreaded The multi-part identifier could not be bound

  • 0

I am running in to the dreaded “The multi-part identifier could not be bound” error on a stored procedure I am currently working on. I have a few questions in regards to the query below.

  1. Why am I getting this error?
  2. Why would this error occur on ImportFundingDateTime instead of FloorplanId given that they both come from the same query, but FloorplanId is listed first in the output clause?
  3. Can I adjust this query to not get the error while still keeping the general structure the same?

.

DECLARE @Results                Table(
    [FloorPlanId]               UNIQUEIDENTIFIER,
    [ImportFundingDateTime]     DATETIME,
    [TimeStamp]                 VARBINARY(8),
    [BusinessId]                UNIQUEIDENTIFIER
    )

UPDATE CacRecord 
    SET MatchFound = 1
    OUTPUT  fp.[FloorplanId], cr.[ImportFundingDateTime],
            fp.[TimeStamp], buyer.[BusinessId]
    INTO @Results(  [FloorplanId], [ImportFundingDateTime], 
                    [TimeStamp], [BusinessId])
    FROM CacRecord cr WITH (NOLOCK)
    INNER JOIN CacBatch cb WITH (NOLOCK)
        ON cr.CacBatchId = cb.CacBatchId
    INNER JOIN Floorplan fp WITH (NOLOCK)
        ON fp.UnitVIN = cr.ImportVin
        AND COALESCE(fp.UnitVIN, '') <> ''
    INNER JOIN Business buyer WITH (NOLOCK)
        ON buyer.BusinessId = fp.BuyerBusinessId
    LEFT OUTER JOIN BusinessContact bc WITH (NOLOCK)
        ON bc.BusinessId = buyer.BusinessId
    LEFT OUTER JOIN Contact c WITH (NOLOCK)
        ON c.ContactId = bc.ContactId
    WHERE cb.CacJobInstanceId = @cacJobInstanceId
        AND fp.FloorplanStatusId = 1 --Approved
        AND COALESCE(cr.ImportVin, '') <> ''
        AND 1 = 
            CASE
                WHEN cr.ImportFein = buyer.FederalTaxID  
                    AND COALESCE(cr.ImportFein, '') <> '' THEN 1
                WHEN cr.ImportSsn = c.Ssn 
                    AND COALESCE(cr.ImportSsn, '') <> '' THEN 1
                ELSE 0
            END;
  • 1 1 Answer
  • 0 Views
  • 0 Followers
  • 0
Share
  • Facebook
  • Report

Leave an answer
Cancel reply

You must login to add an answer.

Forgot Password?

Need An Account, Sign Up Here

1 Answer

  • Voted
  • Oldest
  • Recent
  • Random
  1. Editorial Team
    Editorial Team
    2026-05-19T16:00:53+00:00Added an answer on May 19, 2026 at 4:00 pm

    Please recheck the syntax of the OUTPUT clause OUTPUT on MSDN

    Syntax
    
    <column_name> ::=
    { DELETED | INSERTED | from_table_name } . { * | column_name }
    
    from_table_name
    
    Is a column prefix that specifies a table included in the FROM clause
    of a DELETE or UPDATE statement that is used tospecify the rows to
    update or delete.
    

    It looks like you have aliased CacRecord in the FROM clause as “cr”, but have not correlated that with the UPDATE clause.

    Note: Even with it aliases in the FROM clause and NOT aliased in the UPDATE cause, SQL Server appears to recognize CacRecord as the UPDATE table, requiring you to use INSERTED instead of cr as the virtual table name.

    UPDATE cr
    SET MatchFound = 1
    OUTPUT fp.[FloorplanId], INSERTED.[ImportFundingDateTime],
      fp.[TimeStamp], buyer.[BusinessId]
    INTO @Results( [FloorplanId], [ImportFundingDateTime], 
        [TimeStamp], [BusinessId])
    FROM CacRecord cr WITH (NOLOCK)
    INNER JOIN CacBatch cb WITH (NOLOCK)
     ON cr.CacBatchId = cb.CacBatchId
    INNER JOIN Floorplan fp WITH (NOLOCK)
     ON fp.UnitVIN = cr.ImportVin
     AND COALESCE(fp.UnitVIN, '') <> ''
    INNER JOIN Business buyer WITH (NOLOCK)
     ON buyer.BusinessId = fp.BuyerBusinessId
    LEFT OUTER JOIN BusinessContact bc WITH (NOLOCK)
     ON bc.BusinessId = buyer.BusinessId
    LEFT OUTER JOIN Contact c WITH (NOLOCK)
     ON c.ContactId = bc.ContactId
    WHERE cb.CacJobInstanceId = @cacJobInstanceId
     AND fp.FloorplanStatusId = 1 --Approved
     AND COALESCE(cr.ImportVin, '') <> ''
     AND 1 = 
      CASE
       WHEN cr.ImportFein = buyer.FederalTaxID  
        AND COALESCE(cr.ImportFein, '') <> '' THEN 1
       WHEN cr.ImportSsn = c.Ssn 
        AND COALESCE(cr.ImportSsn, '') <> '' THEN 1
       ELSE 0
      END;
    

    For visitors to this question, this code block shows multiple tables being referenced in the OUTPUT clause correctly.

    create table TO1 (id int, a int);
    create table TO2 (id int, b int);
    create table TO3 (id int, c int);
    insert into TO1 select 1,1;
    insert into TO2 select 1,2;
    insert into TO3 select 1,3;
    insert into TO3 select 1,4;
    
    declare @catch table (a int, b int, c int)
    update c
    set c = a.a
    output a.a, b.b, INSERTED.c
    into @catch(a,b,c)
    from TO1 a
    inner join TO2 b on a.id=b.id
    inner join TO3 c on a.id=c.id
    
    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

I have Nivo Slideshow running on a site. When I test in the dreaded
Running into a problem where on certain servers we get an error that the
Running a ServiceHost with a single contract is working fine like this: servicehost =
Running ipconfig /all shows a Teredo Tunneling Pseudo-Interface. What is that? Does this have
Running into a problem. I have a table defined to hold the values of
I keep getting the dreaded java.something.someException errors while running my java app. and I
Running Rails 3.1.3... I'll use a simple example of nested associations (not sure if
Running .NET 2.0, I have a generic method with the following signature: static listType
Running the following program will print space overflow: current size 8388608 bytes. I have
Running on Rails 3.1 RC1 and following this . A user can have one

Explore

  • Home
  • Add group
  • Groups page
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Users
  • Help
  • SEARCH

Footer

© 2021 The Archive Base. All Rights Reserved
With Love by The Archive Base

Insert/edit link

Enter the destination URL

Or link to existing content

    No search term specified. Showing recent items. Search or use up and down arrow keys to select an item.