sys.dm_exec_describe_first_result_set_for_object returns inconsistent results when the objectid is not valid.Select * From sys.dm_exec_describe_first_result_set_for_object(object_id('NoObject'),1);Returns a single row with a column stating and error message "The object id '0' passed to sys.dm_exec_describe_first_result_set_for_object was invalid."However :with cteProcsas( Select object_id('uspGetBillOfMaterials') as ObjectId union all Select object_id('uspGetBillOfMaterialsNotFound') )select * from cteprocs cross apply sys.dm_exec_describe_first_result_set_for_object(objectid,1);Returns the same data repeated ( though with nullified objectids) for both executions.
Product Language
Version
Category
Operating System
Operating System Language
Steps to Reproduce
Actual Results
Expected Results
Platform
Virtualization