2

I have two tables.

Table 1:

ID Color Description
1 red It's red
2 blue yeah
3 blue blue

Table 2:

ID Family
1 family1
2 family1
3 family2

I want to dissolve table 2 and just add the Family column to the end of my table 1. Easy, right? So I add a family column to table 1 and

UPDATE table1 
    SET Table1.family = table2.family
FROM
table1 INNER JOIN table2 
    ON table1.ID = table2.id;

I get

Syntax Error : Missing operator.

Isn't this the syntax for these types of queries?

Scotch
  • 3,186
  • 11
  • 35
  • 50

3 Answers3

4

The MS-Access syntax for a joined update is as follows:

UPDATE table1 INNER JOIN table2 
ON table1.ID = table2.id
SET table1.family = table2.family
Declan_K
  • 6,726
  • 2
  • 19
  • 30
ron tornambe
  • 10,452
  • 7
  • 33
  • 60
1

You have the wrong syntax, for Access use:

UPDATE table1 INNER JOIN table2 
      ON table1.ID = table2.id
SET Table1.family = table2.family;
Hart CO
  • 34,064
  • 6
  • 48
  • 63
1

Try this:

UPDATE table1 INNER JOIN table2 ON table1.id = table2.id 
SET table1.family = table2.family;
Abhishek Jain
  • 2,597
  • 1
  • 18
  • 12