3 Replies Latest reply: Apr 7, 2010 12:12 PM by Atif Rahman RSS

    Scripting Concatenation and Loops....

      I am having a newbie script problem with Qlikview that I was hoping someone could quickly help me with. I have some customer order data that includes the order number and order comments spread across multiple sequence lines. An example of the data is below the code example. I need to concatenate all of the sequence lines into a single record per each unique order #. I know I need to loop through the data (somehow) to read each line, but I am at a loss on how to accomplish that...?

      Any help is greatly appreciated.

      ~ Kristopher

       


      OrderComments:
      LOAD
      "ORDER_NUM" as OrderNum,
      "SEQUENCE" as "OrdCom_Sequence",
      "BOL_COMMENT" as "Order_Comment"
      FROM ..\AllCompqvdfiles\GMFORDFC.qvd (qvd) WHERE COMPANY='$(Comp)';


      [data example]

      Order# Seq# Order Comments

      ---------- ------- -------------------------------------------------

      435350 1 order comments here from customer
      435350 2 order comments here from customer
      435350 3 order comments here from customer
      435350 4 order comments here from customer

      [/data example]

      Thank You!