declare @tmptable table(
A int identity(1,1) not null,
B int not null,
C int not null
)
insert @tmptable (B,C) select B,C from CONTENT_TABLE
where B in(1,5,10,50,100,200,300,400,500,600,700,800,900,1000) and X = 'WHAT'
declare @i int,@maxcounter int
declare @B int
declare @C int
set @i = 0;
select @maxcounter = count(*) from @tmptable
while @i < @maxcounter
begin
set @i = @i+1
select @B = B,@C = C from @tmptable where A =@i
if(@C =1)
exec PROCEDURE @B,30000
else if(@C = 5 OR @C = 10 OR @C = 50)
exec PROCEDURE @B,10000
else if(@C = 100 OR @C = 200 OR @C = 300 OR @C = 400)
exec PROCEDURE @B,7500
else if(@C = 500 OR @C = 600 OR @C = 700 OR @C = 800 OR @C = 900 OR @C = 1000 )
exec PROCEDURE @B,5000
else
select 'ERROR'
end
'기술관련 > MSSql' 카테고리의 다른 글
SAP SQL Server Transaction (0) | 2009.09.18 |
---|---|
SEAS (0) | 2007.10.30 |
문자셋이 서로다른 디비 컬럼 비교 (0) | 2007.02.22 |
LogShipping (0) | 2007.01.25 |
SQL Server 2000 관리 (0) | 2006.11.10 |