您好朋友,感谢您关注xiaosilent,我在blogjava的博客已经停止更新,请访问http://kuan.fm了解我的最新情况,谢谢!
随笔-82  评论-133  文章-0  trackbacks-0
SELECT cust.id,cust.name,status.name,rate.name,cust.phone,region.name,area.location,(select max(contactdate) from hqoa.t_hq_app_crm_cust_contact where customerid=cust.id  ) as contactdate         FROM  hqoa.t_hq_app_crm_cust cust, hqoa.t_hq_app_crm_cust_type type, hqoa.t_hq_app_crm_cust_status status, hqoa.t_hq_app_crm_cust_rate rate, hqoa.t_hq_app_crm_cust_region region, hqoa.t_hq_app_crm_cust_area area              WHERE  type.id=cust.typeid and  status.id=cust.statusid and rate.id=cust.rateid and region.id=cust.regionid and cust.city=area.no order by contactdate desc , cust.id desc


select (select name from t_hq_app_crm_cust_source where id=sourceid),count(sourceid) from t_hq_app_crm_cust group by sourceid
posted on 2008-07-03 16:14 xiaosilent 阅读(311) 评论(0)  编辑  收藏 所属分类: Java OA

只有注册用户登录后才能发表评论。


网站导航: