Update Query with INNER JOIN between tables in 2 different databases on 1 server

0 votes

Both databases are on the same server.

db1 = DHE
db2 = DHE_Import

UPDATE DHE.dbo.tblAccounts 
INNER JOIN DHE_Import.dbo.tblSalesRepsAccountsLink 
    ON DHE.dbo.tblAccounts.AccountCode = DHE_Import.tblSalesRepsAccountsLink.AccountCode 
SET DHE.dbo.tblAccounts.ControllingSalesRep = DHE_Import.dbo.tblSalesRepsAccountsLink.SalesRepCode

SQL doesn't like it, however, Access can do a query on connected tables with a similar syntax. Can someone please help me with this?

Aug 12, 2022 in Database by Kithuzzz
• 38,000 points
585 views

No answer to this question. Be the first to respond.

Your answer

Your name to display (optional):
Privacy: Your email address will only be used for sending these notifications.

Related Questions In Database

0 votes
1 answer

Can you please explain the difference between inner join and outer join in database?

Hi Suraj, You have a doubt regarding inner join ...READ MORE

answered May 28, 2019 in Database by sampriti
• 1,120 points
1,152 views
0 votes
1 answer

SQL Server replaces LEFT JOIN for LEFT OUTER JOIN in view query

You are getting the joins confused and ...READ MORE

answered Feb 4, 2022 in Database by Neha
• 9,020 points
1,487 views
0 votes
0 answers

How to update two tables in one statement in SQL Server 2005?

In one operation, I want to update ...READ MORE

Aug 20, 2022 in Database by Kithuzzz
• 38,000 points
694 views
0 votes
0 answers

How can I delete using INNER JOIN with SQL Server?

In SQL Server 2008, I want to ...READ MORE

Aug 23, 2022 in Database by Kithuzzz
• 38,000 points
806 views
0 votes
0 answers

Merge 2 tables in SQL and save into 1 new table

I have two tables with the same columns. Table ...READ MORE

Aug 26, 2022 in Database by Kithuzzz
• 38,000 points
416 views
0 votes
0 answers

Replacing NULL with 0 in a SQL server query

I created a query, and the first ...READ MORE

Aug 27, 2022 in Database by Kithuzzz
• 38,000 points
453 views
0 votes
1 answer

Difference between Inner Join & Outer Join

The difference is as follows: INNER JOIN: Returns all those ...READ MORE

answered Sep 7, 2018 in Database by DataKing99
• 8,250 points
1,639 views
0 votes
1 answer

How to connect to sql server from power Bi?

Hi, Follow these steps to connect to SQL ...READ MORE

answered Mar 22, 2019 in Power BI by Cherukuri
• 33,030 points
1,315 views
0 votes
1 answer

How to connect to sql server from Tableau?

Hi, Follow these steps to connect to sql ...READ MORE

answered Mar 22, 2019 in Tableau by Cherukuri
• 33,030 points
1,705 views
0 votes
1 answer

How Can I use "Date" Datatype in sql server?

There's problem in all of them and ...READ MORE

answered Feb 9, 2022 in Database by Neha
• 9,020 points
1,352 views
webinar REGISTER FOR FREE WEBINAR X
REGISTER NOW
webinar_success Thank you for registering Join Edureka Meetup community for 100+ Free Webinars each month JOIN MEETUP GROUP