Results 1 to 2 of 2

Thread: Update with a batch size

  1. #1
    Join Date
    Sep 2002
    Posts
    218

    Update with a batch size

    begin transaction
    update a
    set a.IncomeBand = b.IncBand
    from tbOlRpt6Mnth2_2003 a , tbDevDLOriginLoan b
    where a.saidno = b.idno and a.incomeband is null ----and a.dateid = 12
    and a.idnoerr in (1,11,12,13,14)
    commit

    Have this query that l'm trying to run. l would like to run it in batches grouped by the Rundate
    Rundate is split into 5 (i.e rundate1,rundate2 etc)categories and each catergory has 3 million records. How do l do that and commit after each rundate1 and track how long it took?

  2. #2
    Join Date
    Sep 2002
    Location
    Fantasy
    Posts
    4,254
    --Do this for all the 5 rundates. you can track the time. or run these as job in 5 different steps. you can find the time take by seeing the job step history.

    select getdate()
    begin transaction
    update a
    set a.IncomeBand = b.IncBand
    from tbOlRpt6Mnth2_2003 a , tbDevDLOriginLoan b
    where a.saidno = b.idno and a.incomeband is null ----and a.dateid = 12
    and a.idnoerr in (1,11,12,13,14)
    commit
    select getdate()

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •