sqlquery-101401 (11/25/2012)
delete from #ExistingBackupswhere
(Name not like '%master%' and Name not like '%model%' and Name not like '%msdb%') or
(ISNUMERIC(Right(SUBSTRING(name,1,charindex('.',name)-1),8))=0) or
(Right(SUBSTRING(name,1,charindex('.',name)-1),8) > GETDATE()-1) or
(Name like '%.trn')or
(Name like '%_diff%')
have you tried select for above Tsql and another thing , add one by one the where clause filers and then see where it is moving out if the scene
-------Bhuvnesh----------
I work only to learn Sql Server...though my company pays me for getting their stuff done;-)