Didi
Didi

Reputation: 307

Update field x from second join error

I want to update a.instit but instead of result i got an error 1064

          UPDATE a
          SET a.instit = c.bezeichnung
          FROM kunde AS a
          INNER JOIN bestellte_artikel AS b
          ON a.idkunde = b.idkunde
          INNER JOIN artikel AS c
          ON b.idartikel = c.idartikel
          where 1

Thank You in Advance.

Upvotes: 0

Views: 40

Answers (1)

sagi
sagi

Reputation: 40491

You're using SQL-Server syntax, try this :

UPDATE kunde  a
INNER JOIN bestellte_artikel  b
 ON a.idkunde = b.idkunde
INNER JOIN artikel c
 ON b.idartikel = c.idartikel
SET a.instit = c.bezeichnung
where 1

Upvotes: 1

Related Questions