If you encounter error Msg 11537, Level 16 in SQL Server, chances are that you’re trying to execute a stored procedure by using the WITH RESULT SETS
clause, but you haven’t included all the columns in your definition.
When you use the WITH RESULT SETS
clause in the EXECUTE
/EXEC
statement, you must provide a definition for all columns returned by the stored procedure. If you don’t, you’ll get this error.