6 Replies Latest reply: Sep 17, 2010 5:25 AM by James Shenton RSS

    Help requested with T-SQL script in Qlikview

    James Shenton

      Generally Qlikview is great at processing scripts copied and pasted directly from T-SQL. So a SELECT * FROM x WHERE .... type script works perfectly fine, even if it is quite complex (lots of inner and outer joins, CASE WHEN statements, etc etc).

      However, I've run into a problem where the SQL script relies on a temporary disk table. The following script format is running okay (i.e. Qlikview reports no errors and returns back to the application when it has finished and displays the Select Fields box). But no data is returned.




      SQL SELECT * INTO #temp FROM dbo.x
      SELECT a, b, SUM(c), COUNT(d) FROM #temp GROUP BY a, b
      DROP #temp;

      Could someone tell me what I am doing wrong and how I can fix this? In the above simple example, I need the data from SELECT a, b, SUM(c), COUNT(d) FROM #temp GROUP BY a, b to be returned into the table QlikviewTable. Running the script on my SQL Server gives exactly this.

      With thanks