在查询的表中,数据表中两个列求和,求积,求百分比是怎么实现的,谢谢!
解决方案 »
- delphi中选定变色的问题
- 用Delphi控制Word插入表格
- 急啊!!!!求大家了!!!帮帮忙!!!!在线等!!!!
- 哪位大侠在线,问个关于RAVE报表的问题
- 救命!!!!!!!!!!!!
- 如何使托盘上的图标闪动?
- 问题多多,分数多多,答案呢??????
- 谁能告诉我Delphi的常用函数有哪些?
- 'select * from a where b like ''[as]%'''这一句有没有错呢?
- 高手们!哪个知道DBBackup2.0中例子的"系统表"选项的作用或含义是什么?
- 如何做出象QQ那样收到消息时名字闪动的效果?
- Delphi中怎么实现动态搜索接口,并且动态调用这个接口的方法,在线等待
select t1+t2 as sum_t1_t2 from test ; //求和
select t1*t2 as mul_t1_t2 from test ; //求和
select t1/t2*100 as per_t1_t2 from test ; //求百分比
listitem.Caption :=recordset_temp.Fields[1].AsString ;
listitem.ImageIndex :=0;
recordset_temp2.SQL.Clear ;
recordset_temp2.SQL.Add('select [CUSTOM_ID] from [CUSTOM] where [CUSTOM_AREA]=' + inttostr(recordset_temp.Fields[0].asinteger));
recordset_temp2.Open ;
listitem.SubItems.Add(inttostr(recordset_temp2.recordcount));
listitem.SubItems.Add(format( '%8.2f%',[recordset_temp2.recordcount*100/customcount]));
recordset_temp2.Close ;
new(p);
p^ := recordset_temp.Fields[0].AsInteger ;
listitem.Data :=p;
recordset_temp.Next;
这段代码求百分比吧,帮我解释下好不,recordset_temp2为ADOQuery