Declare @ida smalldatetime
Declare @icd int
DECLARE S_Cursor CURSOR FOR
SELECT Date,cid FROM DayRecomStat group by Date order by Date
OPEN S_Cursor
FETCH NEXT FROM S_Cursor INTO @ida,@icd ;
WHILE @@FETCH_STATUS = '000000' --游标结束标志
BEGIN
exec [Proc_IMeisNewUVInsert] @ida,@icd
FETCH NEXT FROM S_Cursor INTO @ida,@icd;
END
CLOSE S_Cursor
DEALLOCATE S_Cursor