日期:2014-05-17 浏览次数:20478 次
select '移民' as Project,
office0 as Area,
ZType as ConsultType,
50 as ReturnTask,
ID as CustomerID,
Serialnumber as CustomerNumber,
Name,
I.ImCountryID+',' as Country,
TelePhone,
Mobile,
adviser0 as Adviser,
'未处理' as State,
GETDATE() as AddDateTime,
1 as IsSatisfaction,
1 as Flag
from [192.168.20.49].data_91go_oa.dbo.Immigrate_View I
where I.ktype='失效客户'
and DATEDIFF(D,(select top 1 updatetime from [192.168.20.49].data_91go_oa.dbo.dongdaily where bigclass='immigrate' and infomationid=I.ID order by ID desc),getdate())=1