我有一个表mach
   class    studentNum 
    A          40
    B          60
    C          80
    D          100
在ClientDataSet中添加Total的计算字段,
要通过计算字段算出studentNum >60的学生人数总和,应如何设置计算字段的属性?

解决方案 »

  1.   

    select class ,studentNum as total where convert(int,studentNum)>60
      

  2.   


    我是问如何设置计算字段Total的属性来解决?
      

  3.   

    楼上的没错, 计算字段实现不了。就算你建了一个计算字段,然后在adoquery or adotable, or table里的oncalculate事件里写
    adoquery1.fieldbyname('caclcufield').asstring:=adoquery1.fieldbyname('field').asstring;还是要通过adotable /query的filter属性来过滤最好的方法照楼上的没错
      

  4.   

    To:My_first(海浪)及各位:
      为什么不去看一下我的问题呢,也是一个计算字段的问题呀,挂了好长时间没人回答...
      分数少不了~
      

  5.   

    我的问题是:QrExpr显示计算列的问题?
    请大家过去看一下了