>select virtual.*, iif(V_Weight=0,0,v_Value/v_weight) as price; > from Virtual,Stock,Sale; > where stk_Parcel=V_Stock; > and sal_Docnr= stk_docnr; > and V_Box= cKey; > and V_Status= hStk_Sale; > into cursor glSold >Put a space infront of each semi-colon... I have had strange problems with SQL statements that that has solved.