Don't know if you have already solved this problem, but I had a similar situation and found an outstanding solution: fn_Split()
http://msdn.microsoft.com/library/default.asp?url=/library/en-us/dnsqlmag01/html/TreatYourself.asp
This function allows you to pass in any kind of delimited string, and get back a table of the delimited items. You can then run through that table, join it to another, whatever you need. This UDF is extremely helpful in a web environment, especially when you have a list of items passed in from a group of checkboxes on a page, or list items in a List Box, etc.
Hope this may still be of use to you.
-- Andrew
My new philosophy!
Life's journey is not to arrive at the grave safely in a well preserved body, but rather to skid in sideways, totally worn out, shouting "...holy ***...what a ride!"