select isnull((sum(isnull(debit,0))-sum(isnull(credit,0))),0) from folio
where hoteldate <='2007.03.14' And Left(account,1) in (('G', 'R', 'F', 'B'))服务器: 消息 170,级别 15,状态 1,行 2
第 2 行: ',' 附近有语法错误。

解决方案 »

  1.   

    select isnull((sum(isnull(debit,0))-sum(isnull(credit,0))),0) from folio
    where hoteldate <='2007.03.14' And Left(account,1) in ('G', 'R', 'F', 'B')
      

  2.   

    (('G', 'R', 'F', 'B'))没必要这样吧
      

  3.   

    select 
        isnull( ( sum( isnull(debit,0) )- sum( isnull(credit,0) ) ,0) 
    from 
        folio
    where 
        hoteldate <='2007.03.14' 
        And 
        Left(account,1) in (('G', 'R', 'F', 'B'))
      

  4.   

    paoluo(一天到晚游泳的鱼) ( ) 信誉:100    Blog  2007-03-19 15:49:05  得分: 0  
     
     
       select isnull((sum(isnull(debit,0))-sum(isnull(credit,0))),0) from folio
    where hoteldate <='2007.03.14' And Left(account,1) in ('G', 'R', 'F', 'B')
      
     
    -----
    這個不行?錯誤提示是什麼?
      

  5.   

    select isnull((sum(isnull(debit,0))-sum(isnull(credit,0))) --这里多了个"("
      

  6.   

    红尘,你改錯了吧。最外面的ISNULL少了參數了。