DECLARE @i Int
DECLARE @String NVARCHAR(1000)
DECLARE @String1 NVARCHAR(1000)
Declare @str NVarchar(1000)
SET NOCOUNT ON
set @i=1100
While @i<=1119
begin
set @String1='RESTORE LOG [Hermes7] FROM DISK = N''D:\Temp\Hermes\Corporate_Hermes_backup_201109'
Set @string='30.trn'' WITH FILE = 1, NORECOVERY, NOUNLOAD, STATS = 10 '
set @Str=@string1+Cast(@i as Nchar(4))+@string
set @i=@i+1
print @Str
EXECUTE sp_executesql @Str
end