Dynamics GP Land has a new post up on SQL User Defined Functions. UDF's can be used to simplify a SQL Query by making parts of it resuable and isolated, of course they can also make them more complex to interpret since the code exists in multiple places now. But like everything else, UDF's have their place and Steve Endow does a great job of walking us through them.
Update: Added Missing Link
Update: Added Missing Link