select a.FRMNO,a.GATE,a.MSGID,a.MailSendTime,a.UserNM, a.MailSubject,a.IsRead,a.FRMID,a.isattach,b.STATE ,a.FLOWSTATE from ROAMSGE a, ROASTAT b where a.FRMID = b.FRMID and b.state='1' and a.FrmNm like '%" + Cdorpsel1 + "%' and a.MAILSENDTIME>to_date('" + date1 + "','YYYY-MM-DD') and a.MAILSENDTIME<=to_date('" + date2 + "','YYYY-MM-DD')+1 and a.ToUserId='" + flw_LogonId + "' order by MAILSENDTIME desc
好长的SQL!
最新推荐文章于 2023-06-21 19:49:34 发布