Hi @Reportboy2021 ,
You cannot call a stored proc from inside a view. It is not supported. However you can make views call other views, or table-valued user-defined functions.
For the latter you must make sure that you're using inline functions. Otherwise, any subsequent clauses like WHERE
, GROUP BY
and ORDER BY
to will be performed on the dynamically produced resultset instead. Thus, you won't benefit from index searches and the likes. This may have a huge impact on performance.
Best Regards,
Joy
If the answer is the right solution, please click "Accept Answer" and kindly upvote it. If you have extra questions about this answer, please click "Comment".
Note: Please follow the steps in our documentation to enable e-mail notifications if you want to receive the related email notification for this thread.