今天就要搞定,问题还没结果,大家帮忙!!急急 都长痘了
declare @n int,@m int
set @n = 2
set @m = 0
while @m <=@n
begin
SELECT cno,Id, RelatedId,acttype,keeptime
FROM ClientActs
WHERE (CONVERT(datetime, ActTime) BETWEEN CONVERT(datetime,
'2006-06-27 09:00:00') AND DATEADD(mi, @m*30, '2006-06-27 09:00:00')) and cno ='8610000002002'
and acttype in (0,1)
end
set @m = @m+1
死循环