I received help here in EE to write a query that is working well for my desired results.
I now need to convert the query into a UDF or stored procedure that returns the table results that the query currently produces.
I need help figuring out how to convert the query to a UDF. I do not know how to replace the ;WITH part of the code when inside a function.
Thank you much.