declare @I integer = 2117Declare @v varChar(32) = ''Declare @Bit tinyInt = 0while @I > 0 BeginSet @v += case @I %2 WHen 1 Then str(@bit,2,1) + ',' else '' End Set @Bit += 1Set @i /= 2EndSelect case When len(@v) > 0 Then left(@v, len(@v) -1) else '' End
欢迎分享,转载请注明来源:内存溢出
评论列表(0条)