Heeeeeeeelp...........I have this code below, and its not working. I have checked the statements, and they execute when I run them individually, but not as part of this while loop. Can anyone see whats wrong as I cannot see the woods for the trees!!!!DECLARE @count INT, @Rowcount INT, @SQL NVARCHAR(MAX)SET @count = 1SELECT @Rowcount = COUNT(1) FROM INFORMATION_SCHEMA.TABLES WHERE TABLE_SCHEMA = 'crdm'SELECT @Rowcount-- DROP ALL TABLESWHILE @count <= @Rowcount BEGIN SELECT TOP 1 @SQL = 'IF OBJECT_ID(''' + 'crdm.' + TABLE_NAME + ''',''U'') IS NOT NULL BEGIN DROP TABLE crdm.' + TABLE_NAME +' END' FROM INFORMATION_SCHEMA.TABLES WHERE TABLE_SCHEMA = 'crdm' --AND TABLE_NAME NOT LIKE 'Header%' EXEC sp_executesql @SQL SELECT @count = @count + 1 ENDHearty head pats