Unlock a world of possibilities! Login now and discover the exclusive benefits awaiting you.
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!
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;
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);
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);
You can store table as txt file.
STORE Table into output.csv (txt) ;
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.
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;