strsqlc := 'select tradeId,state,payTime,tradeId1,paystate1 from payfee, temp'+
 'where temp.tradeId1 = payfee.tradeId and payfee.state <> temp.paystate1'+
  'and  cdate(payTime) between cdate(:beginTime) and cdate(:endTime)';
这里哪里有问题

解决方案 »

  1.   

    首先
     temp'+ 
    'where 
    temp和where中间的空格没了,变成SQL就成了'...tempwhere..', 先把该加空格的地方加上吧
      

  2.   

    strsqlc := 'select tradeId,state,payTime,tradeId1,paystate1 from payfee, temp'+ 
    'where temp.tradeId1 = payfee.tradeId and payfee.state <> temp.paystate1'+ 
      'and  cdate(payTime) between cdate(:beginTime) and cdate(:endTime)'; 
    两行之间都缺空格
      

  3.   

    strsqlc := 'select tradeId,state,payTime,tradeId1,paystate1 from payfee, temp'+ 
    'where temp.tradeId1 = payfee.tradeId and payfee.state <> temp.paystate1'+ 
      'and  cdate(payTime) between cdate(:beginTime) and cdate(:endTime)'; 
    每两行之间都缺空格