Introduction Many time you have to use Dynamic SQL in your Stored Procedure but some tools (e.g. Tableau) may reject it because metadata is not returned when sp_describe_first_result_set is called in SQL Prepare phase. You may see error like below in that case. Metadata Prepare Call
1 |
exec sp_describe_first_result_set N'EXEC [dbo].[usp_GetInvoicesByCountry] @country=''Germany''' |
Error due to Dynamic SQL Msg […]