Can I use a stored procedure as the CTE_query_definition
of a CTE?
For example:
WITH CodesCTE
AS ( Exec sp_TableReturningProc )
SELECT * FROM CodesCTE;
If not, outside of declaring a batch / global temp table and using a Select
statement against the temp table, is there a way around this limitation?
I am in the process of developing the associated stored procedure and would love to simply the use of it for this purpose if possible.