I'm getting "3075 Missing operator in Getfirst(MM.[UPCPLU],"","") as MyPLU " error in this sql statement:
I have no clue why. Anyone see any problem here?
Code:
SELECT MM.GID, MM.NmProd1, MM.UPCPLU, MM.FoodCat, Max(MD.Jobno) AS LastJob, MM.C3x5, MM.H3x5,
MM.O3x5, GetFirst([MM.UPCPLU],"","") as MyPLU, MM.MWID, MM.ProductClass, MM.Itemdesc1
FROM MM LEFT JOIN MD ON MM.GID = MD.GID
GROUP BY MM.GID, MM.NmProd1, MM.UPCPLU, MM.FoodCat, Len([PSIJobNum]), MM.C3x5,
MM.H3x5, MM.O3x5, GetFirst(MM.[UPCPLU],"","") as MyPLU, MM.MWID, MM.ProductClass, MM.Itemdesc1 HAVING (
(MM.Foodcat='Wetveg') and (nz(MM!C3x5)>0) ) OR
((MM.Foodcat='Wetveg') and (nz(MM!H3x5)>0) ) OR
((MM.Foodcat='Wetveg') and (nz(MM!O3x5)>0)
)
ORDER BY MM.NmProd1 ;