Error while connecting to stored procedure in Tableau

Viewed 243

I'm getting this error while trying to connect to a stored procedure as data source:

Unable to complete action
The stored procedure returned no results. The fields don't have column names, or the data in the fields is not a supported data type

But the same stored procedure returns data in database. Any idea on this?

1 Answers

Please try adding the SET NOCOUNT ON code in the beginning of the stored procedure.

Something like

CREATE PROCEDURE [dbo].[ZZZ_THIS_IS_MY_SP]

    @p                  INT

AS
BEGIN
    SET NOCOUNT ON

    DECLARE @Var1           NVARCHAR(20)
    DECLARE @Var2               DATETIME

    -- All other instructions...
END
Related