SQLTeam.com | Weblogs | Forums



I am using this statement to update some tables:

UPDATE firme_ro
INNER JOIN z_icap_minim ON firme_ro.CUI=z_icap_minim.CUI
INNER JOIN firme_ro ON z_icap_minim.judet_Id <> firme_ro.judeteSiruta_Id AND z_icap_minim.cui = firme_ro.cui
SET firme_ro.Adresa=z_icap_minim.Adresa
WHERE firme_ro.StariFirme_Id=1

It gives error :#1066 - Not unique table/alias: 'firme_ro'

Any advices to make this work?


This is a Microsoft SQL Server forum, so you might not find anyone here who is able to help with your MySQL problem.

In Microsoft SQL Server I would ALIAS both occurrences of [firme_ro] so that they are UNambiguous, but I don't know the syntax in MySQL e.g.

UPDATE firme_ro AS F1
INNER JOIN firme_ro AS F2 ON ...
SET ...


Yes, using alis worked good ! tyvm!