Results 1 to 2 of 2

Thread: Delete Duplicates In a Transaction Fact table

  1. #1
    Join Date
    Sep 2002
    Posts
    218

    Delete Duplicates In a Transaction Fact table

    I have a large table consisting of 68 million rows. I have duplicates in the Fact table
    Whats the best way of deleting the duplicate rows.
    I left out the Transkey because thats the only thing that uniquely identifies a record.
    Whats the best way of deleting the duplicate rows on a large table like this one ?

    tbFactF2005 fields as listed below
    'LoanKey
    ,BookKey
    ,ClientKey
    ,EmployerKey
    ,LoanRefId
    ,ProductKey
    ,HierarchyKey
    ,TransGroupKey
    ,TransactionCode
    ,WhRef
    ,Account
    ,Amount
    ,LoanRef
    ,Client
    ,TransactionType
    ,ValueDate
    ,ProcDate
    ,Company
    ,ReverseInd
    ,BatchNumber
    ,Reference1
    ,Reference2
    ,Narative1
    ,Narative2
    ,User
    ,Time
    ,Date
    ,Source
    ,CashInd
    ,CommInd'

  2. #2
    Join Date
    Nov 2002
    Location
    New Jersey, USA
    Posts
    3,932
    You need to run the delete in smaller sets. How many rows out of 68 million you expect to be deleted?. You may need to run more frequent COMMITs depending on how many you delete.

    You can use

    SET ROWCOUNT nnnn

    or WHERE clause to get smaller set.

Posting Permissions

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