Table of Contents

Support

Function not supported

DECLARE @SQLString nvarchar(500) = 'DECLARE phaseCursor CURSOR FOR SELECT * from '+@myTable;
exec  sp_executesql @SQLString
Only functions and some extended stored procedures can be executed from within a function.

Documentation / Reference