1 Reply Latest reply on May 10, 2012 4:38 PM by Alex Kerin

    Custom SQL for Waterfall - Unable to connect to the Microsoft Excel file

    Tim Harris

      Hi -

      I am using Custom SQL language adopted from the discussion on Waterfall Support, and I am getting the following error message:

       

           Database error 0x80040E10: No value given for one or more required parameters.

      Unable to connect to the Microsoft Excel file "C:\Documents and Settings\...\TableauDevelopment\Datatable\BAL_T1_T2_WATEFALL.xlsx". Check that you have access privileges for the requested file and that it is not open in another application.

       

      I checked with our SQL guy, and he says the code looks good.

       

      SELECT [BAL_T1_T2_TMUS_WATEFALL$].[a_t1] AS [ecount],
      "Start_t1" AS [ecount_type],
        [BAL_T1_T2_TMUS_WATEFALL$].[Column Name] AS [Column Name]
      FROM [
      BAL_T1_T2_TMUS_WATEFALL$]
      UNION ALL
      SELECT [
      BAL_T1_T2_TMUS_WATEFALL$].[total_gains] AS [ecount],
      "Gain_t1" AS [ecount_type],
      [
      BAL_T1_T2_TMUS_WATEFALL$].[Column Name] AS [Column Name]
      FROM [
      BAL_T1_T2_TMUS_WATEFALL$]
      UNION ALL
      SELECT [
      BAL_T1_T2_TMUS_WATEFALL$].[total_losses] AS [ecount],
      "Loss_t2" AS [ecount_type],
      [
      BAL_T1_T2_TMUS_WATEFALL$].[Column Name] AS [Column Name]
      FROM [
      BAL_T1_T2_TMUS_WATEFALL$]

       

      But I still get the error. For what it is worth, the xlsx source file was locking up earlier, saying it was in use by another user.  It wasn't then, and I don't get the message now. But I still get the error.  And I have all the access in the world.  It's on my harddrive.   I only get the error when trying to use the SQL, not when I extract the same file without the SQL.  

       

      Appreciate feedback here.

       

      Tim

       

       

       

       


      If more background needed, intent is to reshape the data for a waterfall chart, basically from this

      Time1GainsLosses
      3200045006500

       

      To this:

      CategoryCount
      Time132000
      Gains4500
      Losses6500