• TheSQLGuru (4/3/2013)


    refactor your TVF to be an INLINE TVF and use that. Also push that SELECT ...(SELECT...) out like previous poster did.

    Actually, the TVF being used is an in-line TVF.