11 Replies Latest reply: Aug 26, 2012 11:57 PM by ranjithchevanan RSS

    Convert sql query to equivalent script in QlikView

      Hello,

       

      I'm migrating an application in WPF to QlikView. So far it has been a smooth process except migrating a histogram. Currently we use sql queries to generate the points for the histogram. The query used looks like the one below.

       

      Select ROUND(SomeNumberColumn/1000000, 1) as 'Number in millions', NULLIF(COUNT(SomeNumberColumn/1000000),0) as Frequency from v_myView where TradeDate between @startdate and @enddate GROUP BY ROUND(SomeNumberColumn/1000000, 1) HAVING COUNT(SomeNumberColumn/1000000) <> 0 ORDER BY ROUND(SomeNumberColumn/1000000, 1)

       

      Note.

      1. I have already loaded all the data in QlikView from the view named v_myView from the database (At load)

       

      I do not want to make another query to the same view to generate the histogram values. I want to get it done at the QlikView script level. Can somebody convert the above sql to qlikview script?

       

      Thanks,

      Ranjith