• atul.jadhav (1/27/2015)


    Is there a unique key in the source Excel data?

    It seems that your ideal flow would be something like:

    1) Process Excel file. For each row:

    2) Does row exist in target table?

    a) Yes: update existing row

    b) No: append row to target table

    Is that right?

    Mr. Phil Parkin

    no sir there is no any unique ket in my source excel data.

    but my process flow like, e.g. i am in Feb-15, now my sql table having only Jan-15 data, now i want to upload Feb-15 data and flow as

    1) Process excel file. for each row: (excel having data where Month = 2)

    2) append the table without deleting Jan-15 Data (on first day of Feb15)

    3) append the table without deleting Jan-15 Data but replace all Feb-15 data and uploade excel file (one second day of Feb-15)

    No unique key? I don't like the sound of that, I'll admit.

    Your options are limited. Something like

    1) Read Excel file, determine month and year.

    2) Delete data for that month and year (only) from the target table.

    3) Load data into target table.

    If you haven't even tried to resolve your issue, please don't expect the hard-working volunteers here to waste their time providing links to answers which you could easily have found yourself.