[hao] [varchar] (15) COLLATE Chinese_PRC_CI_AS NULL ,
[content] [varchar] (140) COLLATE Chinese_PRC_CI_AS NULL
) ON [PRIMARY]
drop table hao070916
select * into hao070916 from #t
select col001
from wu.dbo.gm080118
where seq>=400000 order by newid()
---------------------------------------------------------------------------------------------------------以下是代发时常用的模板
insert into sms_server.dbo.dyhikemessages(to_mobile,msg_content,prefix,epid)
select '13632574155',
'<内容,内容,>',
'','<EPID,epid,>'
select top 19997 <col001,列名,col001>,id from <wu.dbo.华侨城车主6W_0125,数据源表名,>
where 发送='未发'
order by id
insert into sms_server.dbo.dyhikemessages(to_mobile)
select top 19997 <col001,列名,col001> from <wu.dbo.华侨城车主6W_0125,数据源表名,>
where 发送='未发'
order by id
update sms_server.dbo.dyhikemessages
set msg_content='<内容,内容,>'
update <wu.dbo.华侨城车主6W_0125,数据源表名,> set 发送='<已发0128,发送日期,>' where <col001,列名,col001> in (
select top 19997 <col001,列名,col001> from <wu.dbo.华侨城车主6W_0125,数据源表名,>
where 发送='未发'
order by id
)
update sms_server.dbo.dyhikemessages
set epid='<EPID,epid,>'
select count(*) from sms_server.dbo.dyhikemessages where send_out_flag=0
select * into send_yifa.dbo.dyhikemessages_<gm080118,备份的表名,>_bak from sms_server.dbo.dyhikemessages
truncate table sms_server.dbo.dyhikemessages
update <表,表,> set <col001,列名,col001> =replace(<col001,列名,col001>,' ','')
select distinct <col001,列名,col001> from <表,表,> where <col001,列名,col001> like '[1][3,5][0-9][0-9][0-9][0-9][0-9][0-9][0-9][0-9][0-9]'
where substring(<col001,列名,col001>,1,1) in ('0')
and substring(<col001,列名,col001>,2,1) not in ('0')