delphi 一个SQL语句的问题
要查两个日期之间的数据datetimepicker1和datetimepicker2sql语句该怎么写啊
select sum(DECODE(SHDJLB,'G',1,'E',1,'A',1,'8',1,'5',1,'1',1,'H',-1,'D',-1,'B',-1,'7',-1,'4',-1,'2',-1,0)*spmoney)"移动"
from sellhead,sellpayment
WHERE spbillno=shbillno and (SHDATE >= TO_DATE('2013-08-17','YYYY-MM-DD')
ANDSHDATE < TO_DATE('2013-08-17
','YYYY-MM-DD')+ 1)AND SPPMCODE = '91'
-- and shsyjid = '2008'
求大虾解惑~~~
呵呵,学习了 呵呵,学习了
页:
[1]