W windynet Unregistered / Unconfirmed GUEST, unregistred user! 2001-12-14 #1 可不可以回答?如何用参数得到SQL中SUM的返回值?
浩 浩毛 Unregistered / Unconfirmed GUEST, unregistred user! 2001-12-15 #2 select sum(字段名) as count from table where... 返回的COUNT字段就是你要的SUM结果了
Y YNTW Unregistered / Unconfirmed GUEST, unregistred user! 2001-12-15 #3 直接用Query.Fields[0].AsInteger不行?
0 002670 Unregistered / Unconfirmed GUEST, unregistred user! 2001-12-15 #4 select @var = sum(字段名) from 表名 where 條件 我這是在sql server 的存儲過程用過 怎麼樣給一點分吧
F flysand Unregistered / Unconfirmed GUEST, unregistred user! 2001-12-15 #5 create procedure myproc @vsum float ontput as select @vsum=sum(field1) from tsable1 go