problem loading data using modified date

  • Hi every one..

    can any one briefly explain how to do incremental loading,i have a modified date column in my source table .so how can i do incremental loading .Have any documents on this, please post it.

    Regards..

    Anil....

    Regards..
    guru12

  • For each record in your source, check for existence (match on PK) in destination. In pseudo code:

    If Exists 'Record already exists

    If Source_Modified_Date <> Destination_Modified_Date 'Does record need to be updated?

    Update_Destination_From_Source

    End If

    Else 'Record does not exist in destination

    Create_Destination_from_Source

    End If 'Move to next record in Source

    The absence of evidence is not evidence of absence
    - Martin Rees
    The absence of consumable DDL, sample data and desired results is, however, evidence of the absence of my response
    - Phil Parkin

  • This was removed by the editor as SPAM

  • stewartc-708166 (7/20/2010)


    select col1, col2,.... from sourceTable

    where modifiedDate > (select max(modifiedDate) maxMod from destinationTable)

    That's a better way of identifying your source data - every record will result in an INSERT or an UPDATE.

    The absence of evidence is not evidence of absence
    - Martin Rees
    The absence of consumable DDL, sample data and desired results is, however, evidence of the absence of my response
    - Phil Parkin

  • Thanks for your valuable suggestions,i will try both and i will get back to you if any queries..

    Regards..

    Anil..

    Regards..
    guru12

Viewing 5 posts - 1 through 4 (of 4 total)

You must be logged in to reply to this topic. Login to reply