• Thanks a lot for your reply!

    Can you please guide me how to call a iTVF function

    in the Select SQL I posted? Same syntax or I need

    to use Cross Apply?

    I don't mind to try the nested replace, I

    have created one, but I can't execute the Select

    SQL in the original way.

    Thanks and Regards,

    Jingchen