13 Replies Latest reply: Apr 13, 2015 7:34 AM by Harshal Patil RSS

    Calculate Field Name in Script

    Giuseppe Gallina

      Hi,

       

      I have a question, I have a table in DB with many field that have this name:

       

      Table1:

       

      ItemID01

      ItemID02

      ItemID03

      ...

      Quantity01

      Quantity02

      Quantity03

      ...

       

      I need to load every Item field anf quantity with the same field name.

       

      I try with this:

       

      For i=1 to 3

       

      Temp:

      LOAD 'ItemID' + text(num(i,'00')) AS ItemID.

         'Quantity' + text(num(i,'00')) AS Quantity

          FROM Table1;

       

      but seem that QlikView dont resolve names of field 'ItemIDxx and Quantityxx.

      SO I dont know wich is the right syntax.

       

      Please can you help me?

      Thank you very much.