The big question is are there any "built in" SQL Server 2005 functions to serialize / deserialize string parameters to a table variables? The rest explains my need further, but may not be necessary.
I have a SQL SP I would like to refactor. It currently accepts five customers ids and five sets of order ids relevant to those customers. (one to many).
I would like to change the parameters to select one or more customer ids each having one or more order ids.
The customer id list would be easy because you can provide a string "1,3,5,77,21", then dbo.split(@customer, ',') (then isnumeric() and convert(int)..)
Pages would be more difficult. My first thought is a string like "[1, 3, 5], [2, 4, 6], [2, 4, 6]". Of course, I could cheat and do a double dbo.split() on something like "1,3,5|2,4,6|2,4,6". However, I would want something a little more humanized and standard, maybe XML?