2

I have two tables here.

Table1:

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

Table 2:

  **ID**         **Family**
    1              family1
    2              family1
    3              family2

So 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 table1 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,080
  • 11
  • 33
  • 48

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,506
  • 2
  • 17
  • 30
ron tornambe
  • 9,926
  • 7
  • 32
  • 59
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
  • 32,944
  • 5
  • 44
  • 59
1

Try this:

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