• assuming you have an identity PK you could do something like this (psuedo-code)

    get maxid

    @i = minid

    while @i < @maxid

    begin

    begin tran

    insert newtable select origtable where id between @i and @i + 500000

    check for error

    optionally delete from origtable where id between @i and @i + 500000

    commit or rollback/abend while

    @i = @i + 500000

    optionally backup log with truncate_only if don't care about recoverability

    end

    if you have some non-numeric PK or unique index, simply put TOP 500000 keyfield from origtable into temp table

    then do the insert (and optional delete) joining that table to origtable

    Best,
    Kevin G. Boles
    SQL Server Consultant
    SQL MVP 2007-2012
    TheSQLGuru on googles mail service