• The use of table-valued parameters in SQL Server 2008 removes the need for these comma separated parameters.

    But if you need something like this you could use a CLR function or use something like this:

    --select * from [System].[tfn_DelimStringToTable]('a,b,c,d,e',',')

    CREATE FUNCTION [System].[tfn_DelimStringToTable](@str NVARCHAR(max),@delim CHAR(1))

    RETURNS @table TABLE ([ID] INT IDENTITY(1,1),[Column] sysname NOT NULL)

    WITH SCHEMABINDING,ENCRYPTION

    AS

    BEGIN

    DECLARE @x XML

    SET @x = '<t>' + REPLACE(@str,@delim, '</t><t>') + '</t>'

    INSERT INTO @Table([Column])

    SELECT x.i.value('.', 'NVARCHAR(MAX)') AS token

    FROM @x.nodes ('//t') x(i)

    RETURN

    END