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 8248849
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: June 7, 20262026-06-07T23:20:18+00:00 2026-06-07T23:20:18+00:00

I am trying to join three tables within an update statement, but I have

  • 0

I am trying to join three tables within an update statement, but I have been unsuccessful so far. I know this query works for joining two tables:

update table 1
set x = X * Y
from table 1 as t1 join table 2 as t2 on t1.column1 = t2.column1

However, in my case, I need to join three tables so:

update table 1
set x = X * Y
from table 1 as t1 join table 2 as t2 join table3 as t3 
on t1.column1 = t2.column1 and t2.cloumn2 = t3.column1

Will not work. I also tried the following query:

update table 1
set x = X * Y
from table 1, table 2, table 3
where column1 = column2 and column2= column3

Does anyone know of a method to accomplish this?

  • 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-06-07T23:20:20+00:00Added an answer on June 7, 2026 at 11:20 pm

    You definitely don’t want to use table, table, table syntax; here’s why. As for your middle code sample, join syntax follows roughly the same rules for SELECT as it does for UPDATE. JOIN t2 JOIN t3 ON ... is not valid, but JOIN t2 ON ... JOIN t3 ON is valid.

    So here is my proposal, though it should be updated to fully qualify where y comes from:

    UPDATE t1
      SET x = x * y  -- should either be t2.y or t3.y, not just y
      FROM dbo.table1 AS t1
      INNER JOIN table2 AS t2
      ON t1.column1 = t2.column1
      INNER JOIN table3 AS t3
      ON t2.column2 = t3.column1;
    
    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

I have a three different tables that I'm trying to join up correctly but
I have the following three tables. I am trying to inter link (join) among
I have been trying to join two tables (USERS AND USERS_ROLES) based on their
I am trying to join three tables together but having a problem getting the
I have a MySQL Left Join problem. I have three tables which I'm trying
I am trying to join three tables in MySQ, but when I do it
I am trying to join three tables together without any success so far. I
I'm trying to use a join on three tables query I found in another
I am trying to do a left outer join on three tables. I know
I am trying to join two tables together, but have an odd requirement. Normally

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.