Qlik Community

QlikView Deployment

Discussion Board for collaboration related to QlikView Deployment.

ryanfoster84
Contributor

Storing into CSV with Comma and Double Quotes

Hi,

I need to store my results into a CSV file and have the comma separator and double quotes like the example below:

A,B,C,D,E,F,G,H,I,J,K,L,M

"C","CO","CT","F","A","seed","38","T","F","F","6","6","1"

Currently when I export to CSV using this:

STORE PROD INTO $(vExtData)ref_prod.csv(txt);

DROP TABLE PROD;


I get the following output


A,B,C,D,E,F,G,H,I,J,K,L,M

C,CO,CT,F,A,seed,38,T,F,F,6,6,1

is there away to get the desired results

Labels (2)
6 Replies
Highlighted
MVP & Luminary
MVP & Luminary

Re: Storing into CSV with Comma and Double Quotes

Hi,

Try this.

Load ' " '& Field1 & ' " ' as Field1,

         ' " '& Field2 & ' " ' as Field2

From XYZ;

Then normal Store command.

Regards,

Kaushik Solanki

Regards,
Kaushik
If reply is satisfactory, please "Like" the post.
If reply is solution, please mark as "Correct".
Highlighted
ryanfoster84
Contributor

Re: Storing into CSV with Comma and Double Quotes

hi,

no this does not work

A,B,C,D,E,F,G,H,I,J,K,L,M

"""C""","""CO""","""CT""","""F""","""A""","""seed""","""38""","""T""","""F""","""F""","""6""","""6""","""1"""

Highlighted

Re: Storing into CSV with Comma and Double Quotes

Use the delimiters and options:

STORE Table INTO File.txt (ansi, txt, delimiter is \t); // for example

EDIT details in help site:

https://help.qlik.com/en-US/qlikview/November2017/Subsystems/Client/Content/Scripting/ScriptSpecifie...

Highlighted
ryanfoster84
Contributor

Re: Storing into CSV with Comma and Double Quotes

I'm not to sure on this would you have an example of how to do this for my issue?

Highlighted
ryanfoster84
Contributor

Re: Storing into CSV with Comma and Double Quotes

thanks having read the material and tried numerous things I am still at a lose

Highlighted

Re: Storing into CSV with Comma and Double Quotes

See attached on how to use the syntax to save TXT files with quotes.

I don't know your specifications so you will have to see which options best meet your needs.