一道vfP程序题 高手请进
altertableorderaddcolumn总金额N(7,2)closealluseordergotopdowhilenoteof()selesum(orderite...
alter table order add column 总金额 N(7,2)
close all
use order
go top
do while not eof()
sele sum(orderitem.数量*goods.单价) from orderitem,goods where;
orderitem.商品号=goods.商品号 and orderitem.订单号 =order.订单号;
group by 订单号 into array a
replace 总金额 with a(1)
skip
enddo
replace 总金额 with a(1) 换成update order set 总金额=a为什么不行??总金额全部是一个值?? 展开
close all
use order
go top
do while not eof()
sele sum(orderitem.数量*goods.单价) from orderitem,goods where;
orderitem.商品号=goods.商品号 and orderitem.订单号 =order.订单号;
group by 订单号 into array a
replace 总金额 with a(1)
skip
enddo
replace 总金额 with a(1) 换成update order set 总金额=a为什么不行??总金额全部是一个值?? 展开
1个回答
推荐律师服务:
若未解决您的问题,请您详细描述您的问题,通过百度律临进行免费专业咨询