Hi,
Thanks for your answers.
I tested the various solutions and the only one which functions is as
follows:
DECLARE C1 CURSOR
READ_ONLY
FOR SELECT name FROM sysobjects
DECLARE @tablename varchar(40)
OPEN C1
FETCH NEXT FROM C1 INTO @tablename
WHILE...