• Hmm... good point, but...

    but thinking more of user-supplied list of values (like, say, an SSRS report, that passes the parameter to a stored proc to get the data for the report), and not wanting/being able to convert that delimited string into XML somewhere else to then pass in to a proc, expect the end user to properly wrap values in some other delimiter, etc...

    Like, send in a list of dates (like, I haven't wrapped the individual values in double-quotes, etc... )

    8/17/2016,8/24/2016, 9/12/2016, 4/1/2015, ...

    ...then the XML splitter, using the explicit type cast to a date or datetime in the XQuery statement, just works, reasonably enough...

    Also, the XML splitter code will work for multiple-character delimiters, too...