• Well, this isn't exactly what I wanted to do since it doesn't seem to be as clean as I would like but...

    I took the statement from the function and put it directly in my SELECT as a Correlated Subquery:

    SELECT t.HPROPERTY AS HPROP,

    CASE WHEN t.dtleasefrom BETWEEN s.begdate AND s.enddate AND t.dtrenewdate IS NULL

    AND ISNULL(p.dtapply, t.dtsigndate) IN

    (SELECT CalendarDate

    FROM (SELECT CONVERT(SMALLDATETIME, CONVERT(VARCHAR(4), YEAR(DATEADD(yy, -1, begdate)))

    + '0901') +

    N3.NUM * 100 +

    N2.NUM * 10 +

    N1.NUM AS CalendarDate,

    begdate

    FROM (SELECT 0 AS NUM UNION ALL

    SELECT 1 UNION ALL

    SELECT 2 UNION ALL

    SELECT 3 UNION ALL

    SELECT 4 UNION ALL

    SELECT 5 UNION ALL

    SELECT 6 UNION ALL

    SELECT 7 UNION ALL

    SELECT 8 UNION ALL

    SELECT 9) AS N1,

    (SELECT 0 AS NUM UNION ALL

    SELECT 1 UNION ALL

    SELECT 2 UNION ALL

    SELECT 3 UNION ALL

    SELECT 4 UNION ALL

    SELECT 5 UNION ALL

    SELECT 6 UNION ALL

    SELECT 7 UNION ALL

    SELECT 8 UNION ALL

    SELECT 9) AS N2,

    (SELECT 0 AS NUM UNION ALL

    SELECT 1 UNION ALL

    SELECT 2 UNION ALL

    SELECT 3) AS N3,

    SEASONS

    WHERE (hprop = t.HPROPERTY AND shortdesc = @season)) GenCalendar

    WHERE CalendarDate < CONVERT(SMALLDATETIME, CONVERT(VARCHAR(4), YEAR(begdate)) + '0901'))

    AND ISNULL(l.renewal_transfer, 'No') <> 'Yes'

    THEN 'New Leases'

    WHEN t.dtleaseto > s.enddate AND t.dtleasefrom <= s.enddate AND t.dtrenewdate

    IS NOT NULL AND t.dtrenewdate IN (SELECT *

    FROM dbo.GetCalendarTable(@Season,553))

    THEN 'Renewals'

    This allows me to use the outer table's t.HPROPERTY value as I need.

    Of course, if someone knows how to make the other way work, I'm all eyes.