Is there any way to call a stored procedure in multi scalar table-valued function like that?
Note: this query returns error:
I resolved this problem. I wrote a table-valued function including executable query, returns table and prepared an stored procedure to call that function passing parameters. It works for me.