Writing an unescape function for transact sql.