PerfectPhase wrote:
Just write a SQL-CLR function and call that Smiley

Congratulations!  You've turned a simple code problem into a deployment headache?