• Is this an INLINE Function? Can you post the create script (generate it using SSMS) of this function?

    .