select a.syxh,a.cwdm,a.zxrq,a.ypmc,a.zje,a.czyh,a.ysdm,a.bqdm,b.syxh,b.blh,b.hzxm,b.sex,b.brnlsmfrom ZY_BRFYMXK aleft join ZY_BRSYK bon a.syxh=b.syxhwhere a.dxmdm='120'and CONVERT(nvarchar(50),convert(date,left(zxrq,8),120))+' '+right(zxrq,8)>='${ksrq}' and CONVERT(nvarchar(50),convert(date,left(zxrq,8),120))+' '+right(zxrq,8)<='${jsrq}'