同样的语句。。。在数据库中查询出来的数据。。。和在帆软的数据不一样?
你把同样的语句分别在设计器与数据库执行看看呢?
select
left(CONVERT(varchar(100), ghsj ,25),10) 日期,
count(*) as 门诊患者人次数
from ms_ghmx
where 1=1
${if(len(starttime)=0,""," and ghsj>='"+starttime+" 00:00:00'")}
${if(len(endtime)=0,""," and ghsj<='"+endtime+" 23:59:59'")}
and ksdm not in (select ksdm from ms_ghks where ksmc like '%急诊%')
and thbz = 0
group by left(CONVERT(varchar(100), ghsj ,25),10)
order by left(CONVERT(varchar(100), ghsj ,25),10);