sql - Missing expression and then group function not allowed error -
i wondering doing wrong. have 2 tables
odetails
, orders
odetails
has following columns: ono, pno, qty, cost
orders
has following columns: ono, cno, eno, received, shipped, order_cost
update orders set order_cost= 1 * sum( select cost odetails orders.pno=odetails.pno ) ;
try this. (sum in wrong place)
update orders set order_cost= 1 * ( select sum(cost) odetails orders.pno=odetails.pno ) ;
Comments
Post a Comment