Jasonchne
Jasonchne
2018-10-15 05:20

SQL语句执行卡死,在线等。

  • sql

SQL语句执行卡死,
select a.CType as '类别',a.ChargeDetailsName as '费用名称',a.CDPayServiceName as '收费项目',
sum(a.ChargeDetailsPrice) as '费用总价',a.CDExecutiveSectionName as '执行科室',
a.CDOpenBillName as '开单科室',a.CDTime as '记账时间',a.CDHopitalName as '医院名称',
b.StaffName as '开单医生',c.CFRemarks as '费用类别'
from HJY_ChargeDetailsInfo as a LEFT JOIN HJY_StaffInfo as b on a.SID =b.SID
left join HJY_ChargeClassificationInfo as c on a.CDPayServiceName = c.ChargeClassificationName
--where
--a.ChargeDetailsName like '%粪便%'
--a.CType like '%门诊%'
group by a.CType,a.ChargeDetailsName,a.ChargeDetailsPrice,a.CDDepartment,a.CDTime,a.CDOpenBillName,a.CDHopitalName,
a.CDExecutiveSectionName,a.CDPayServiceName,b.StaffName,c.CFRemarks

  • 点赞
  • 回答
  • 收藏
  • 复制链接分享

3条回答