Qlik Community

QlikView Scripting

Discussion Board for collaboration on QlikView Scripting.

khag_hs
New Contributor

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?

Tags (2)
1 Solution

Accepted Solutions
dagomezl
Contributor III

Re: store Data in different files

Hello Khag,

here is the file Qvw with the solution,

I wait help

4 Replies

Re: store Data in different files

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

Re: store Data in different files

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

dagomezl
Contributor III

Re: store Data in different files

Hello Khag,

here is the file Qvw with the solution,

I wait help

khag_hs
New Contributor

Re: store Data in different files

Thank You, it works perfectly.

Community Browser