SA0189 : Store procedure executed without getting a result
The topic describes the SA0189 analysis rule.
Store procedure executed without getting a result
The rule checks EXECUTE statements for stored procedure not being called and returned value assigned to a variable.
Assign the result of the executed stored procedure to a local variable and handle any error result.
The rule has a Batch scope and is applied only on the SQL script.
Rule has no parameters.
The rule does not need Analysis Context or SQL Connection.
Design Rules, Bugs
There is no additional info for this rule.
1USE AdventureWorks2012; 2 3DECLARE @result INT 4EXEC @result = dbo.uspGetWhereUsedProductID 819, '20050225'; 5 6EXECUTE dbo.uspGetWhereUsedProductID 819, '20050225';
|1||SA0189 : Store procedure executed without getting a result.||6||0|