Qlik Community

QlikView Scripting

Discussion Board for collaboration on QlikView Scripting.

Announcements

Breathe easy -- you now have more time to plan your next steps with Qlik!
QlikView 11.2 Extended Support is now valid through December 31, 2020. Click here for more information.

Not applicable

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

1 Solution

Accepted Solutions
jchoucq
Not applicable

Re: Writing data to a text file

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

1 Reply
jchoucq
Not applicable

Re: Writing data to a text file

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