...when this is so easily done without it and it works in a stored procedure or a function without having to somehow get to the command line to do it?
How would you do it in T-SQL?
There are no special teachers of virtue, because virtue is taught by the whole community.
--Plato