34,593
社区成员
发帖
与我相关
我的任务
分享
update 表2
set 表2.生日 = c.生日
from ( select ID,电话号码 as 电话,CAST(right(信息内容,8) as datetime) as 生日 from 表1
where 接收时间 > DATEADD(Minute,-5,getdate()) ) as c
where c.电话 = 表2.电话
CREATE procedure [dbo].[mypr]
as
begin
insert into 表2(ID,电话,生日) select ID,电话号码 as 电话,CAST(right(信息内容,8) as datetime) as 生日 from 表1
where 接收时间 > DATEADD(Minute,-5,getdate())
end
http://blog.csdn.net/LIUMRZY/archive/2009/06/10/4258338.aspx
看看这个博文,作业调度可以解决你的问题!