1 Reply Latest reply: Oct 15, 2013 4:23 AM by Tresesco B RSS

    Script

    Manish Kachhia

      How to write below SQL code in QlikView Script ?

       

      Select

      PARTNO,

      MONTH(DATE) as MONTH,

      YEAR(DATE) as YEAR,

      SUM(QTY),

      SUM(SALESAMT),

      SUM(COSTAMT)

      From SALES

      Group By PARTNO, MONTH(DATE), YEAR(DATE)


      Thanks in advance !!

        • Re: Script
          Tresesco B

          Try something like:

           

          Table1:

          Load

          PARTNO,

          MONTH(DATE) as MONTH,

          YEAR(DATE) as YEAR

          From  SALES;

           

          Table2:

          Load *,

          SUM(QTY) as Tot_Qty,

          SUM(SALESAMT) as Tot_Sales,

          SUM(COSTAMT) as Tot_CstAmt

          Resident Table1

          Group By PARTNO, MONTH, YEAR ;