I recently answered this question how-to-call-user-defined-function-in-order-to-use-with-select-group-by-order-by
My answer was to use an inline view to perform the
An inline view is a virtual table created in the from statement during the execution of the code/program