6 Replies Latest reply: Mar 29, 2012 10:36 AM by Henric Cronström RSS

    Looping through records in Qlikview? (As in Oracle / SAP ABAP)

    Yaseen Pullissery

      Hi All


      I am working on a report that takes long time to processes, so thought of doing it in QlikView. How could I simulate the below logic (script) assuming I have both tables in DBMS:

       

       

      //Creating a cursor to loop through the sales lines

      cursor mytable as select * from customer_order where year = 2012;


      string DocType := '';

       

      //For each record check

       

      foreach myrec in mytable

       

      if myrec.document_type = '02' then

      DocType := 'Sales';

      else if myrec.document_type = '03' then

      DocType := 'Return';

      else

      DocType := 'Sales';

      end if


      insert into mytable 2 values (myrec.document_no, DocType, ....)


      end foreach


      Thank you in Advance!

      Regards
      MultiView

       

      Message was edited by: Multi View