SQL Server Portal

In my previous article, I wrote about sp_describe_first_result_set. In this article we will discuss about a new error message (The metadata could not be determined because the statement ‘%.*ls’ is not compatible with the statement ‘%.*ls’) introduced in SQL SERVER 2012. This error message is somehow relates to sp_describe_first_result_set.

Let’s discuss it in detail:

Message Number: 11509

Severity : 16

Error Message: The metadata could not be determined because the statement ‘%.*ls’ is not compatible with the statement ‘%.*ls’.

Error Generation:
Let me create an example to generate this error:

sp_describe_first_result_set_error1

Now, you can see that the above query is executed successfully. Lets pass the above query to sp_describe_first_result_set. to view the metadata information of the first possible result set.

Example 1 :

Oops……………

Msg 11509, Level 16, State 1, Procedure sp_describe_first_result_set, Line 1
The metadata could not be determined because the statement ‘Select BusinessEntityID , NationalIDNumber from [HumanResources].[Employee]…

View original post 231 more words