_ | 覦覈襦 | 豕蠏手 | 殊螳 | 譯殊碁
FrontPage › StringCompare2

Contents

1 bit 一 覓語
2


1 bit 一 覓語 #

襯 れ, 200606 ~ 200812蟾讌 危 覿襯 bit襦 貉殊 り 螳.
れ螻 螳 2螳讌 bit 覓語伎 .

  • 111000101111000000 --> int 232384
  • 111100101111000001 --> int 248769

讀, 101000000000000000 企, 200606, 200608 蟆企. 襷 2螳 bit 覓語伎 谿企ゼ 觜蟲る 企至 伎 蟾?

2 #

with dumy
as
(
        select 1 seq
        union all
        select seq + 1 from dumy
        where seq + 1 <= datediff(dd, '20060601', getdate())
), rs
as
(
	select 
		seq 
	,	convert(char(6),dateadd(mm, seq, '20060601'), 112) yyyymm
	from dumy
), bits
as
(
	select '111000101111000000' bit1, '111100101111000001' bit2
	--232384 ^ 248769
)
select
	b.yyyymm
from bits a
	inner join rs b
		on b.seq <= len(a.bit1)
where substring(a.bit1, seq, 1) <> substring(a.bit2, seq, 1)
option (maxrecursion 0);
蠍 蠍郁鍵..
企: : るジ讓曙 襦螻豺 企Ν 譯殊語. 襦螻豺
EditText : Print : Mobile : FindPage : DeletePage : LikePages : Powered by MoniWiki : Last modified 2018-04-13 23:12:52

螳襭 豺襦 螻讌螻 襷 襦 蟇一伎.