求助,我想查询1月开户数量,这样写 有什么问题..
怎么查不出来啊?
SELECT * FROM issuedetail a , nodeinfor b
WHERE a.nodeno =b.nodeno and a.tracode='07' AND a.opetime between '20090101' and '20090131' AND b.nodetree LIKE '5100000151000077%'
opetime 交易时间
ISSUEDETAIL 发卡交易明细表
nodeno  卡号
tracode 开户交易类型 selectCNNICsql 

解决方案 »

  1.   

    SELECT a.opetime  FROM issuedetail a , nodeinfor b
    WHERE a.nodeno =b.nodeno and a.tracode='07' --AND a.opetime between '20090101' and '20090131' AND b.nodetree LIKE '5100000151000077%'执行这个看看有没有结果
      

  2.   

    try this,select * 
     from issuedetail a, nodeinfor b
     where a.nodeno=b.nodeno and a.tracode='07' 
     and a.opetime between '2009-01-01 00:00:00' and '2009-01-31 23:59:59' 
     and b.nodetree like '5100000151000077%'
      

  3.   

    无结果就是说确实没数据咯,注意是2009年1月的(a.opetime between '2009-01-01 00:00:00' and '2009-01-31 23:59:59').
      

  4.   

    select *   from issuedetail a, nodeinfor b  where a.nodeno=b.nodeno and a.tracode='07'  and a.opetime between '2009-01-01 00:00:00.000' and '2009-01-31 23:59:59.997'  and b.nodetree like '5100000151000077%'这个呢?