标题: 永洪执行sql语句前台和后台不一致 [打印本页] 作者: yhdata_XVqnsYUK 时间: 2022-7-28 12:04 标题: 永洪执行sql语句前台和后台不一致 前台sql语句
>select *from (select case
when MZGH_BRJZ_GH.ZBDM = '2' then
'副主任号'
when MZGH_BRJZ_GH.ZBDM = '3' then
'主任号'
when MZGH_BRJZ_GH.ZBDM = '4' then
'知名专家号'
when GHKS = '2223' then
'急诊'
else
'普通号'
end 挂号类型,KSMC 科室名称,YSXM 医生姓名,1 患者人数 from MZYS_JZLS,MZGH_BRJZ_GH where MZYS_JZLS.GHLSH=MZGH_BRJZ_GH.ghlsh and<年月> to_char(MZGH_BRJZ_GH.GHRQ,'YYYYMM')>=?{年月} </年月>)
后台sql语句SELECT "科室名称"FROM (select *from (select case when MZGH_BRJZ_GH.ZBDM = '2' then '副主任号' when MZGH_BRJZ_GH.ZBDM = '3' then '主任号' when MZGH_BRJZ_GH.ZBDM = '4' then '知名专家号' when GHKS = '2223' then '急诊' else '普通号' end 挂号类型,KSMC 科室名称,YSXM 医生姓名,1 患者人数 from MZYS_JZLS,MZGH_BRJZ_GH where MZYS_JZLS.GHLSH=MZGH_BRJZ_GH.ghlsh and)) "SUB_QRY"GROUP BY "科室名称"ORDER BY "科室名称" ASC