如何在dbgrid中最后一行增加一行统计一列得和
解决方案 »
- fastreport ez1100 条形码打印
- delphiUDP协议分包收包的问题
- 难点,请教各位老大,高手请进,请求各位帮小弟一个忙!!!!!
- RadioGroup的item是动态加的,如何计算RadioGroup的Height和Width?
- 请问怎样判断一个FORM是打开着的(show或者showmodal)
- 怎样实现字符串类型的数组的换行显示
- 一个很古怪的错误
- 如何实现穷举法破译密码?
- Delphi 学到一般水平需要多少时间? 推荐的学习步骤是什么?
- 如何限制只能输入小数点后俩位,多于俩位的不让它输入?
- ADOQuery出现错误:“无法记录所做的更改,因为您输入的值违反了为此表或列定义的设置”
- 第三方控件 请问大家DevExpress
union
統計的語句union前後的SQL語句執行的結果必須表結構一致.
case stationno when '1' then '17楼小卖部' when '2' then '19楼餐厅' end as stationno ,
sum(consume) as con
from consume_main where unit_id in (select left(levelid,2) from ic_dept where name='财务部')
and so_id in(select right(levelid,2) from ic_dept where name='财务部')
and dept_id in(select left(SUBSTRING(levelid, 3, 4),2)from ic_dept where name='财务部')
and computer_id='1' and stationno>0 and curtime>'2008-12-23 12:00:00.000'
GROUP BY employeeid,
name,cardid, stationno
order by employeeid