• Sorry for the late response

    I need SQL Query for this

    @batch_count is configurable (common for all tables)
    @incremental_value =1

    I have table1 with 500000 records  need to insert to tableA

    I have table2 with 100000 records need to insert to tableB

    I have table3 with 200000 records need to insert to tableC

    after insert batch wise, maximum count respective tables should end their loop

    --- Lynn Pettis
    Table will be empty

    --- Jeff Moden
    1. How many "millions of record"?
    15 tables I want to do, some tables have around million records

    2. How many bytes does the average "record" contain?
    Only one table I have xml data , others are normal

    3. Are both tables in the same database, different databases on the same instance, different instances, or what ???
    Actually it is two different databases and different servers.

    But approach is 
    i. Create NewDB in Source server
    ii. Create 15 tables, Push data to newDB from sourceDB
    iii. Take backup

    iv. Create and Restore NewDB in Destination Server
    v. Push data from 15 tables to DestinationDB

    Thanks a Lot for Response🙂