fnMFParseDelimitedString

Signature

dbo.fnMFParseDelimitedString(
    @List      VARCHAR(MAX),
    @Delimiter CHAR(1)
)

Returns

  • Table-valued result with one row per item: - Item NVARCHAR(…) - Position INT (1-based index)

Parameters

  • @List VARCHAR(MAX) (required) - Delimited list to convert to a key-value style table.

  • @Delimiter CHAR(1) (required) - The single-character delimiter, e.g., ‘,’.

Purpose

Convert a delimited list into a normalized table of items with positions.

Examples

SELECT *
FROM dbo.fnMFParseDelimitedString('A,B,C', ',');

Changelog

Date

Author

Description

2019-08-30

JC

Added documentation

2017-12-17

LC

Increase size of listitem to ensure that it will cater for longer names

2014-09-13

AC

Initial Version - QA