• Taking a guess here, but is the table valued function you use in this process a multi-statement table valued function?

    Also, looks like you may have several scalar functions being used, are this in the select list of any tables queried or in the where or join clauses between tables?