9 Replies Latest reply on Jul 30, 2018 11:52 AM by Ken Flerlage

    Troubleshooting calling procs in Tableau

    Mike Planting


      Here is a simple example of what I am trying to do.    I will like to call the proc dbo.sp_testdatereturn from tableau, pass a date parameter, and then have the data source return the date.  What are the tricks for getting this type of proc to work?  Thanks for the help!






      /* Create Proc */




      CREATE PROCEDURE dbo.sp_testdatereturn @AsOfDate_MST_parm date








      --DECLARE @AsOfDate_MST_parm date 


      --SET @AsOfDate_MST_parm = '6/1/2018'




      DECLARE @AsOfDateTime_MST datetime2  


      SET @AsOfDateTime_MST = CAST(@AsOfDate_MST_parm AS datetime2)




      SELECT @AsOfDateTime_MST




      /* Call Proc */


      EXEC dbo.sp_testdatereturn @AsOfDate_MST_parm = '2018-06-01';




      When I try to use the proc in tableau, I get the following (attached) error.



      • The "[dbo].[sp_testdatereturn]" stored procedure returned no results. The fields don't have column names, or the data in the fields is not a supported data type. Unable to connect to the server "servername". Check that the server is running and that you have access privileges to the requested database.