Hi i wanted to find away to do an update using a Join between three tables and i was strugelling until i stumbled accross this in the frequently asked questions. faq183-1958.
However now i get a syntax error when i try and verify the SQL. any ideas?
Incorrect syntax by the word AS.
thanks
-Gus
However now i get a syntax error when i try and verify the SQL. any ideas?
Incorrect syntax by the word AS.
Code:
UPDATE tblCategories AS tblParentCat INNER JOIN
tblCategories AS tblSubCat ON tblParentCat.Category_ID = tblSubCat.SubCategory_ID INNER JOIN
tblProducts ON tblSubCat.Category_ID = tblProducts.Category_ID
SET tblParentCat.Mask = 15, tblSubCat.Mask + 0, tblProducts.Mask + 0
WHERE (tblParentCat.SubCategory_ID = 0) AND (tblParentCat.Category_ID = 1)
thanks
-Gus