Skip to main content
Announcements
Introducing Qlik Answers: A plug-and-play, Generative AI powered RAG solution. READ ALL ABOUT IT!
cancel
Showing results for 
Search instead for 
Did you mean: 
Anonymous
Not applicable

.CSV file

Hi,

I have 6 tables in my datamodel, I need to save around 10fields from these 6 tables into .csv file instead of .qvd.

How can i store fields from different tables into one .csv file?

Please help...

Thanks!

6 Replies
Clever_Anjos
Employee
Employee

You have to join your tables, building a temp table

tmp:

LOAD field1, field2 resident Table1;

JOIN LOAD field1, field3 resident Table3;

join LOAD field1, field5 resident Table4;


Store tmp into tmp.csv(txt);

drop table tmp;

swuehl
MVP
MVP

Concatenate your resident tables into a single table using

EXPORT:

LOAD * RESIDENT Table1;

CONCATENATE

LOAD * RESIDENT Table2;

..

Then store to a file

STORE EXPORT INTO Export.csv (txt);

maxgro
MVP
MVP

QlikView store use one table.

If you want to store fields from different tables you have to load all fields (concatenate ?) in a single table and then store.

an example

file:

load field1 resident table1;

concatenate (file) load field2, field3 resident table2;

......

concatenate (file) load field10 resident table10;

store * from file into file.csv (txt);

Not applicable
Author

You can store table as txt file.

STORE Table into output.csv (txt) ;

jagan
Luminary Alumni
Luminary Alumni

Hi,

A CSV file can store only one table details, if you want to store columns from different tables into a single CSV then join all the required tables and store it in CSV using STORE command.

Example:

TableName:

LOAD

*

FROM DataSource1;

LEFT JOIN

LOAD

*

FROM DataSource2;

STORE Column1, Column2, Column3, Column4, Column5, Column6 FROM TableName INTO FileName.CSV;

Regards,

Jagan.

qlikviewwizard
Master II
Master II

I think , it is better to use at the end of the data model in a new tab. Better to drop the table after store.Hope this will help you.

TableName:

LOAD *

FROM DataSource1;

LEFT JOIN

LOAD

* FROM DataSource2;

STORE Column1, Column2, Column3, Column4, Column5, Column6 FROM TableName INTO FileName.CSV(TXT);

DROP TABLE TableName;