侧边栏壁纸
博主头像
陈大雷的 Blog博主等级

行动起来,活在当下

  • 累计撰写 98 篇文章
  • 累计创建 24 个标签
  • 累计收到 0 条评论

目 录CONTENT

文章目录

case when then end

Administrator
2010-04-29 / 0 评论 / 0 点赞 / 39 阅读 / 402 字
select
sum(case  when lcc.iCurrencyID=1  then  lcc.iNumber*fUnitprice
                       else  lcc.iNumber*lcc.fUnitprice*lcc.fExchangeRate end)
            ,0) as a
 from  lccomeslist  as  lcc  where  istatus=1
  and lcc.iLCContractID  in
  (
 select cml.iLCContractID from CmLCContract as cml
    where cml.istatus=1 and cml.iLoanCustomerID = 1
   )
0

评论区