Question 50
A report developer tries to call a side-effecting stored procedure from a T-SQL user-defined function. Which implementation step most directly addresses this requirement?
Explanation
Correct Answer
T-SQL functions have restrictions on side effects unlike stored procedures. Keep side-effecting operations in a procedure and return queryable values through permitted functions. Tests show the function computes values without unauthorized writes.
Incorrect Answers
T-SQL UDFs restrict side effects; write work belongs in permitted procedures and must be invoked at a suitable boundary.
Syntax indirection cannot substitute for a compliant function design; permitted operations and composition must be evaluated.
Keep computations in functions and side-effecting operations in transactional procedures with explicit authorization and tests.