Bubbler numbers

0

Please login or register to vote for this query.

(click on this box to dismiss)

Stack Overflow

Q&A for professional and enthusiast programmers

use master
DECLARE @i INT=85

DECLARE @ char(99)=''WHILE @i>0SELECT @=left(@i%2,1)+@,@i/=2
;WITH 
C as(SELECT number+1n FROM spt_values WHERE'P'=type)
SELECT count(*)FROM C,C D
WHERE not(@ like'%000%'or @ like'%111%'or len(@)<D.n*3+C.n+2)
and @ like'%'+replicate(substring(@,C.n,D.n+1),3)+'%'

Enter Parameters

Options:
Switch sites:
loading Hold tight while we fetch your results