1 Reply Latest reply: Sep 16, 2011 9:44 AM by Dennis Hoogenboom RSS

    My table label gets ignored

      You know, when you put a load or sql query in your load script, you precede those statements with a 'table_name:'? One of those gets ignored.

      My goal is to load data from an Excel file, and then load that data again with 'resident' so I can sort it.

       

      exampletable_temp:

      LOAD id, date

      FROM

      [Example.xlsx]

      (ooxml, embedded labels, table is Example);

      SQL SELECT 1;

       

      exampletable:

      load id, date resident exampletable_temp

      order by date asc;

       

      drop table exampletable_temp;

       

      I would think the temporary table would get filled, then the data ordered and put in exampletable, and then the temporary table deleted.

      However, what happens is all data gets loaded in the temporary table, then the result of the second load also gets put in the temporary table (exampletable never gets made), and then the temporary table (with duplicate values) gets deleted. So nothing remains.

       

      Why is that?

        • My table label gets ignored
          Dennis Hoogenboom

          Yes. What you are doing is create 2 identical tables. Qlikview will always combine these.

           

          Try something like this:

           

          exampletable_temp:

          LOAD id, date

          FROM

          [Example.xlsx]

          (ooxml, embedded labels, table is Example);

          SQL SELECT 1;

           

          exampletable:

               load id as ID_new,

               date as Date

          resident exampletable_temp

          order by date asc;

           

          drop table exampletable_temp;

           

          I think that should work.

           

          Good luck,

          Dennis.