1 Reply Latest reply: May 26, 2015 6:45 AM by Johann Choucq RSS

    Writing data to a text file

      Hi All,

       

      I have two separate tables created in the backend.

      Table A and Table B.

      I want to store the data present in these two tables in a single text file.

       

      The text file should contain data in the below format:

      Heading1

      Data from table A would be displayed here.

       

      Heading2

      Data from table B should be displayed here.

       

      Note:

      There is no relation between Table A and Table B. Also, there should be a space between data from Table A and Heading2.

       

      Thanks,

      Asma

        • Re: Writing data to a text file
          Johann Choucq

          Dear Asma,

           

          in qlikview, in a store statement, it is one qlikview table into one file.

          So you will have to concatenate your table before using the store statement.

           

          your table must have the same name colums, for example :

           

          FileToExport:

          Load

          col1,

          col2

          from table A;

           

          Concatenate (FileToExport)

          Load

          '' as col1

          '' as col2

          autogenerate (1);

           

          Concatenate (FileToExport)

          Load

          col3 as col1,

          col4 as col2

          from table B;

           

          Store FileToExport into MyFile.txt (txt);

           

          hope this helps.

           

          Johann