1:试一下
(isnull(exch_rate,0)*(isnull(debit,0)+isnull(credit,0)))as   Localcurrency
2:计算列不可以更新。如果想查找用rst.find

解决方案 »

  1.   

    select b1.exp ,b1.acct_no ,b2.acct_name ,b1.cy_id ,b1.exch_rate ,b1.debit ,b1.credit,(isnull(exch_rate,0) * isnull(debit,0) + isnull(exch_rate,0) * isnull(credit,0))  as   Localcurrency,b1.obj_id ,b1.settle_code ,b1.settle_no ,b1.bank_loan_no  from vch_template_dt b1 left join gl_acct b2 on b1.acct_no=b2.acct_no where b1.t_id=6
      

  2.   

    Localcurrency=exch_rate *debit +exch_rate *credit
    --
    这里要注意,= 右边的四项要保证不能够为空(null),只要其中有一项为null,那你的Localcurrency就是null了。
    所以你需要用isnull(col,0)来处理。