• A SQLCLR object might be a better option here: http://www.sqlservercentral.com/Forums/Topic1406771-386-1.aspx

    There are no special teachers of virtue, because virtue is taught by the whole community.
    --Plato