C#后台sql语句注释,根据isnull()方法进行条件选择
时间:2021-07-01 10:21:17
帮助过:56人阅读
left join ffs_publicelement d on d.code=isnull(b.project_type,k.project_type) and d.type=‘project_type‘ left join FFS_PAYMENT e on e.projectapplyid=a.guid
left join FFS_PAYMENTDETAIL f on f.projectapplyid=a.guid
left join IFS_USER g on g.guid=f.payopuser
left join IFS_USER h on h.guid=a.saler_id
left join FFS_CustomerRefsaler i on i.customer_id=isnull(b.customerid,k.customerid) and i.recordstatus=‘A‘
left join ffs_publicelement j on j.code=a.recordstatus and j.type=‘ProjectApply_Status‘
where isnull(b.project_date,k.project_date) between ‘2017-01-25‘ and ‘2017-04-26‘
--and b.project_type in(‘001‘,‘002‘,‘003‘,‘004‘,‘005‘) and a.recordstatus=‘Payed‘ and isnull(b.recordstatus,k.recordstatus)=‘Approved‘
蓝色标记 处中,利用是isnull()方法巧妙的进行选择on的条件;
红色标记处中,该段sql语句是写在C#后台中,利用"--"来进行注释
C#后台sql语句注释,根据isnull()方法进行条件选择
标签:isnull end 红色 amt ase detail yam 利用 use