TRY:while @find=1
begin
/*保证iValue位于iStart和iEnd之间*/
set @iValue = CONVERT(INT,RAND(datepart(millisecond,getdate())) * (@iEnd - @iStart + 1) + @iStart)/* 产生随机数*/
select @q_no=q_no from #mtemp where mid=@iValue
print @q_no
select @already=count(*) from s_temptable where (q_type=@q_type
and q_no=@q_no and s_xh=@xh)
if @already=0 set @find=0
end
begin
/*保证iValue位于iStart和iEnd之间*/
set @iValue = CONVERT(INT,RAND(datepart(millisecond,getdate())) * (@iEnd - @iStart + 1) + @iStart)/* 产生随机数*/
select @q_no=q_no from #mtemp where mid=@iValue
print @q_no
select @already=count(*) from s_temptable where (q_type=@q_type
and q_no=@q_no and s_xh=@xh)
if @already=0 set @find=0
end
解决方案 »
免费领取超大流量手机卡,每月29元包185G流量+100分钟通话, 中国电信官方发货