I understand the context of this forum is SQL Server side but if you can use C# vb.net etc. to do the transformation then here is a great link to do so.
http://blogs.msdn.com/b/alextch/archive/2006/03/04/convertobjectsidtostring.aspx
Why Msoft has not provided a built in function yet I don't know? Seems like it would be widely accepted.