Please start any new threads on our new site at https://forums.sqlteam.com. We've got lots of great SQL Server experts to answer whatever question you can come up with.

 All Forums
 SQL Server 2000 Forums
 Transact-SQL (2000)
 Help in delete query

Author  Topic 

schinni
Yak Posting Veteran

66 Posts

Posted - 2003-10-16 : 11:13:08
I am trying to run this delete there are about
2million rows,i am going to do this thinking it gets committed after
every 10000 rows and desn't fill up the log but it is ..
an help on this

set rowcount 10000
select 1
while @@rowcount > 0

Delete
from Test
where stdate > convert(char(10),getdate()-1,120)

set rowcount 0

nr
SQLTeam MVY

12543 Posts

Posted - 2003-10-16 : 12:09:50
Is the database set to simple recovery mode?
Are there any open transactions? (try dbcc opentran)

==========================================
Cursors are useful if you don't know sql.
DTS can be used in a similar way.
Beer is not cold and it isn't fizzy.
Go to Top of Page

schinni
Yak Posting Veteran

66 Posts

Posted - 2003-10-16 : 12:14:00
No it's in full,it has to be in full nothing
is being run at the time that delete processes
runs

Thanks,
Go to Top of Page
   

- Advertisement -