/******************************************************************************
 SCRIPT:	report.sql
** Copyright Microsoft, Inc. 1994 - 2000
** All Rights Reserved.

 OWNER:		RonMart

 PURPOSE:	Displays the report tables
		
******************************************************************************/
use SQL7Upgrade
GO

set nocount on

-- Display the report
declare @report nvarchar(256)
declare @title nvarchar(256)
declare rptCursor cursor for
select report, title from SQL7Upgrade.dbo.tmpSummary where [rowcount] > 0
open rptCursor
fetch rptCursor into @report, @title
while @@fetch_status = 0
	begin
		print @title
		exec('select * from ' + @report)
		fetch rptCursor into @report, @title
		print ''
	end
close rptCursor
deallocate rptCursor

set nocount off

GO