• Time to take a step back. You have:

    BuildDates.BuildEventType IN (dbo.DelimitedSplit8K(@BuildEventTypes,','));

    This is the same as

    BuildDates.BuildEventType = dbo.DelimitedSplit8K(@BuildEventTypes,',');

    But since DelimtedSplit8K is a table-valued function, this is not going to work out. You need to query the table-valued function:

    BuildDates.BuildEventType IN (SELECT col FROM dbo.DelimitedSplit8K(@BuildEventTypes,','));

    You need to replace "col" with the actual column name used by the function (which I don't know by heart).

    [font="Times New Roman"]Erland Sommarskog, SQL Server MVP, www.sommarskog.se[/font]