WHERE ... HAVING sugamt > 0 ; ORDER BY ...>I am trying to retreive all values that return a non-zero from a expression column, but I'm getting syntax error saying:
>SQL: Column 'SUGAMT' is not found. >>
>SELECT Products.p_productname, Products.p_itemcode,; > Products.p_unitsinstock, Products.p_unitsonorder,; > Products.p_totqtyperunit, Products.p_qtyperunit, Products.p_max,; > Products.p_min,; > IIF(Products.p_unitsinstock<=Products.p_min,Products.p_max-Products.p_min,0000000) as sugamt; > FROM ; > warehouse!products; > WHERE Products.p_itemcode BETWEEN ?lc_bitem AND ?lc_eitem AND Products.p_listactive = .T. and sugamt > 0; > order BY Products.p_productname INTO CURSOR prodrep >>