• Thank you very much for your help.

    Yes this is good solution.I will put this code in store procedure and run it through Execute sql task.

    Thanks,

    Unnati