_ | 覦覈襦 | 豕蠏手 | 殊螳 | 譯殊碁
FrontPage › CSV貉殊企宏觜讌螳レ谿剰鍵

[http]覓語
貉殊 一危郁 '2, 7, 3, 5, 9, 1, 0 '  螳 れ願 . 
 貉殊 0 ~ 9蟾讌 螳 れ伎  ,   覓伎企, 0 ~ 9 螳 覈  蟆 .
  蟆曙 旧 4螳  . 


create table #temp(val varchar(30))
insert #temp values('2, 7, 3, 5, 9, 1, 0 ')

select 
    min(a.val)
from (
    select 0 val union all
    select 1 val union all
    select 2 val union all
    select 3 val union all
    select 4 val union all
    select 5 val union all
    select 6 val union all
    select 7 val union all
    select 8 val union all
    select 9 val 
) a
    cross join #temp b
where charindex(convert(char(1), a.val), b.val) = 0    

csv螳 row襦 シ豎讌 朱..
with dummy
as
(
    select 0 num union all
    select 1 num union all
    select 2 num union all
    select 3 num union all
    select 4 num union all
    select 5 num union all
    select 6 num union all
    select 7 num union all
    select 8 num union all
    select 9 num 
), rd(num)
as
( 
    select 2 union all
    select 7 union all
    select 3 union all
    select 5 union all
    select 9 union all
    select 1 union all
    select 0 
)
select min(a.num) 
from dummy a
    left join rd b
        on a.num = b.num
where b.num is null   
蠍 蠍郁鍵..
企: : るジ讓曙 襦螻豺 企Ν 譯殊語. 襦螻豺
EditText : Print : Mobile : FindPage : DeletePage : LikePages : Powered by MoniWiki : Last modified 2018-04-13 23:12:52

苦 伎狩 觜伎 願屋伎 覓語螳 . (レ)