Posted on 2006-04-20 11:39
Raistlin 阅读(403)
评论(0) 编辑 收藏 引用 所属分类:
Database
DECLARE f_Cursor CURSOR FOR
SELECT a.*
FROM OPENROWSET('SQLOLEDB','FSERVER';'sa';'x',
'SELECT * FROM pubs.dbo.authors ORDER BY au_lname, au_fname') AS a
OPEN f_Cursor
FETCH NEXT FROM f_Cursor
WHILE @@FETCH_STATUS = 0
BEGIN
FETCH NEXT FROM f_Cursor
END
CLOSE f_Cursor
DEALLOCATE f_Cursor