Hey guys i was trying to convert my INSERT query into an Update query. But i have problems doing it. This is my Insert query:
INSERT INTO lm_Artikel (Status)
SELECT 'NOK'
FROM lm_Artikel A
INNER JOIN lm_Schwellwert S ON A.Typ = S.Typ
WHERE A.Bestand < S.Schwellwert
And this is my attemp to convert it:
Update A SET A.Status = 'NOK'
FROM lm_Artikel A
INNER JOIN lm_Schwellwert S ON A.Typ = S.Typ
WHERE A.Bestand < S.Schwellwert
It is not working can anyone help me?
in MySQL, there is no
FROMkeyword when joining a table. Your join syntax is correct but that’s forT-SQL