The fast way of working around it will be to modify the function's last line, so insead of the the line
RETURN @String
it would be
RETURN REPLACE(@String, '^','')
Adi
--------------------------------------------------------------
To know how to ask questions and increase the chances of getting asnwers:
http://www.sqlservercentral.com/articles/Best+Practices/61537/
For better answers on performance questions, click on the following...
http://www.sqlservercentral.com/articles/SQLServerCentral/66909/