Do not input private or sensitive data. View Qlik Privacy & Cookie Policy.
Skip to main content

Announcements
Qlik Open Lakehouse is Now Generally Available! Discover the key highlights and partner resources here.
cancel
Showing results for 
Search instead for 
Did you mean: 
khag_hs
Contributor II
Contributor II

store Data in different files

Hi,

I have a table like this:

ABC
10011,12,0
10011,23,0
10021,14,0
10021,23,0
10031,11,0

Now I want to export the content of the table in different txt-files:

Each Data with the same content in colume A should be stored into the same txt-file.

In my example I shoud get three txt-files:

1001.txt

1002.txt

1003.txt

For example, file 1001.txt shoud have the following content:

A          B          C    

1001     1,1         2,0

1001     1,2         3,0

Can anyone help me?

1 Solution

Accepted Solutions
Anonymous
Not applicable

Hello Khag,

here is the file Qvw with the solution,

I wait help

View solution in original post

4 Replies
alexandros17
Partner - Champion III
Partner - Champion III

You have to replicate the same logic of your table to make queries to store data.

If you provide the example I'll help you

Not applicable

Hi ,

       Try the below code .

If consider your Table name as TableData .

ColumnList:

Load Distinct A as TxtFilename resident TableData;

Let j=NoOfrows('ColumnList')-1;

For i=0 to j step 1

let s=Peek('TxtFilename',i,'ColumnList') ;

noconcatenate

Tab:

Load * resident TableData 

where A='$(s)' ;

Store tab into   path/$(s).txt .

Drop table Tab;

Next

Please reply me for the same.

//yusuf

Anonymous
Not applicable

Hello Khag,

here is the file Qvw with the solution,

I wait help

khag_hs
Contributor II
Contributor II
Author

Thank You, it works perfectly.