insert into sms_zqj(lsh,msisdn,dj_date,in_msg)values(@cnt,@i_msisdn,getdate(),@i_msg)
select @id=len(@s)-len(replace(@s,4,'')) insert into sms_zqj(lsh,msisdn,dj_date,in_msg)values(@cnt,@i_msisdn,getdate(),@i_msg)
-- set @out_msg='摇骰结果是:'+@s+',欢迎继续参与!'
-- set @out_msg=@id
set @out_msg='谢谢参与'
if @id=1
begin
set @out_msg='一寿'
end
if @id=2
begin
set @out_msg='举人'
end
if @id=3
begin
set @out_msg='三红'
end
if @id=3
begin
set @out_msg='状元'
end
select @id=len(@s)-len(replace(@s,4,'')) insert into sms_zqj(lsh,msisdn,dj_date,in_msg)values(@cnt,@i_msisdn,getdate(),@i_msg)
-- set @out_msg='摇骰结果是:'+@s+',欢迎继续参与!'
-- set @out_msg=@id
set @out_msg='谢谢参与'
if @id=1
begin
set @out_msg='一寿'
end
if @id=2
begin
set @out_msg='举人'
end
if @id=3
begin
set @out_msg='三红'
end
if @id=3
begin
set @out_msg='状元'
end
declare @i int
declare @s int
set @i=1
set @s=0
set @a='123456'
while @i<=len(@a)
begin
set @s=@s+cast(substring(@a,@i,1) as int)
set @i=@i+1
end
if @s=21
print '对堂'
declare @t int
declare @i int
set @i=1
set @t=0
set @a='133456'
while @i<=len(@a)
begin
if charindex(cast(@i as varchar),@a)>0
set @t=@t+1
set @i=@i+1
end
if @i=6
print '对堂'