4 Replies Latest reply: Jun 28, 2013 3:45 AM by Florian Kausler RSS

    Dynamic LOAD Statement

      Dear Community,

       

      I am trying to build a solution that allows external configuration of Loads statements that are then "calculated" in QlikView script. As you may know, variables can be used for field values or field names. Examples as the following do work fine:

       

      LOAD '$(var)' AS field

      SQL SELECT ...

       

      However I wondered if there is a way to fully replace the LOAD Statement by a single Variable as in the following example:

       

      LOAD $(var);

       

      where var = Field1, Field2, Field3 AS RenamedField;

       

      Unfortunately I either get the original SQL field names or an error depending on the syntax I use. Does anyone know how to make the LOAD part fully variable?

       

      Thank you