< DOCTYPE html PUBLIC -WCDTD XHTML StrictEN httpwwwworgTRxhtmlDTDxhtml-strictdtd>
DECLARE titles_cursor CURSOR FOR select distinct E_ID from C_Employee order by E_ID ASC ;
declare @ids as varchar(1000)
OPEN titles_cursor
declare @iname as int
FETCH NEXT FROM titles_cursor INTO @iname
WHILE @@FETCH_STATUS = 0
BEGIN
select top 10 * from c_monthattendance where
FETCH NEXT FROM titles_cursor INTO @iname
END
CLOSE titles_cursor
deallocate titles_cursor
declare @ids as varchar(1000)
OPEN titles_cursor
declare @iname as int
FETCH NEXT FROM titles_cursor INTO @iname
WHILE @@FETCH_STATUS = 0
BEGIN
select top 10 * from c_monthattendance where
FETCH NEXT FROM titles_cursor INTO @iname
END
CLOSE titles_cursor
deallocate titles_cursor
本文转自 netcorner 博客园博客,原文链接: http://www.cnblogs.com/netcorner/archive/2009/10/17/2912056.html
,如需转载请自行联系原作者