0 Replies Latest reply on Sep 1, 2016 4:21 PM by Michael Staton

    Tableau Desktop 10 - Difficulties with Custom SQL Query.

    Michael Staton

      Greetings,

       

      I am very new to Tableau Desktop and I've been trying to consume data from the SCCM Database.  A gentlemen on Reddit posted a working Custom SQL Command that I can use in SQL Studio, but when I try to copy / paste it into Tableau I'm getting an error with @assignID.

       

      https://www.reddit.com/r/SCCM/comments/50jf06/sccm_patch_report_just_the_tip/

       

      I can get this snippet to work, but I'm having a hard time getting it to calculate the data. 

       

      Line 15 - 67.

       

      If I use the whole thing I get this error code.

       

      [Microsoft][SQL Server Native Client 11.0][SQL Server]Must declare the scalar variable "@AssignID".

      [Microsoft][SQL Server Native Client 11.0][SQL Server]Must declare the scalar variable "@AssignID".

      [Microsoft][SQL Server Native Client 11.0][SQL Server]Incorrect syntax near ')'.

      Unable to connect to the server "cm01". Check that the server is running and that you have access privileges to the requested database.