declare @eventname nvarchar(100);
set @eventname=N'公告';
declare @rate decimal(9,2);
declare my_cursor cursor scroll dynamic
for select EventName from dbo.PM_Event;
open my_cursor
declare @event nvarchar(100);
fetch next from my_cursor into @event
while(@@fetch_status=0)
begin
set @rate=dbo.F_GetsimilarRate(@eventname,@event)
select @event,@rate;
fetch next from my_cursor into @event
end
close my_cursor
deallocate my_cursor