• Abu Dina (12/18/2013)


    kapil kapil kapil..... what's wrong bro? 😛

    You're transferring all records where StatusFlag = 0 so your UPDATE statement will be changing all records with StatusFlag = 0 to StatusF;ag = 1 (in other words updating the rows you've just transferred).

    UPDATE YourTable

    SET StatusFlag = 1

    WHERE StatusFlag = 0

    True if you are updating the source table. Not necessarily true when updating the destination table.

    ps: you were quick with your edit 😉

    Need an answer? No, you need a question
    My blog at https://sqlkover.com.
    MCSE Business Intelligence - Microsoft Data Platform MVP