1 Reply Latest reply: Jul 2, 2010 9:13 AM by Miguel Angel Baeyens de Arce RSS

    Multiple LOAD tables from single SQL

    Dinesh Thoniparambil

      Is it possible to create multiple table from a single SQL statement? I Have a need to join the master calendar table to more than one date fields in the same table & I am thinking of loading the same table again and again & join to different date columns.




        • Multiple LOAD tables from single SQL
          Miguel Angel Baeyens de Arce

          Hello Dinesh,

          Instead of doing several loads, unless specifically necessary, I'd load just once, renaming the date field, using field length for example


          Table: Field1, Field2, If(Len(DateField1) > 0, DateField1, If(Len(DateField2) > 0, DateField2)) as DateField

          depending on your data source, of course. Anyway, QlikView concatenates implicitly if all fields are named alike, so you can concatenate under the same table label as many sql/load statements as you want, provided they return always the same number of fields with the same name.

          Nevertheless, you can use CONCATENATE keyword before the LOAD to force QlikView concatenate several sql/load statements, but you will have to take care on date field names, as you want all of them to link to the master calendar.

          Hope this helps!