Regis,
use set row count
the general logic would be (sorry syntax is incorrect):
set row count 10000
select 'hello world'
while @@rowcount > 0
delete from Customer where createdate between blab and blab
. . . Tom
On 04/30/2003 11:17:23 AM Regis Biassala wrote:
> DBAs,
> suppose you have a table with 400 millions of rows and You only have to
> delete 140 millions...what would be your best approach in accomplishing this
> ?
> example:
> table customer(CustNr int, Name varchar(100), Createdate datetime)
> The query for deleting would look like:
> delete from Customer where createdate between blab and blab
>
> Is there way of deleting let say n number of rows at a time ?
>
>
> Thanks,
> Regis
-----------------------------------------------------------------
Visit our Internet site at http://www.reuters.com
Get closer to the financial markets with Reuters Messaging - for more
information and to register, visit http://www.reuters.com/messaging
Any views expressed in this message are those of the individual
sender, except where the sender specifically states them to be
the views of Reuters Ltd.
MS Sql Server LazyDBA home page