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 閱讀(331)
評論(0) 編輯 收藏 所屬分類:
Java OA