医药CRM系统开发

自已做医药CRM系统有四年了,终于可以算个产品了,努力市场化,今年重种将医药营销的理念加入CRM

导航

药品监控中门店上传间隔天数

Posted on 2008-01-29 14:36  hhq80  阅读(166)  评论(0编辑  收藏  举报
--入库记录有多少天没有上传
select areabm,(select areaname from sun_jk_area b where b.bm=a.areabm ) as qymc,qydm,(select dmmc from sun_jk_jyqy c where c.dm=a.qydm and a.areabm=c.areabm) as qymc,max(updatetime) as maxupdate,datediff(dd,max(updatetime),getdate()) as ts from sun_jk_rkmx a group by areabm,qydm order by areabm,qydm
select areabm,(select areaname from sun_jk_area b where b.bm=a.areabm ) as qymc,qydm,(select dmmc from sun_jk_jyqy c where c.dm=a.qydm and a.areabm=c.areabm) as qymc,max(updatetime) as maxupdate,datediff(dd,max(updatetime),getdate()) as ts from sun_jk_ckmx a group by areabm,qydm order by areabm,qydm