CSV - Decimal Question

More
2 years 2 weeks ago #23955 by downing
Hello,

I am currently generating a csv file from a Qlik qvd.
During the transformation I should recognise if there is a comma number inside and then put this number under inverted commas.

QVD:
LNCompany,Unit,Description,Physical Quantity,Rounding Factor,ISO Code
1010,BA,Tonne (VPE),2,10,TNE
1010,BE,Bündel/Gebinde,2,0,001,

CSV
LNCompany,Unit,Description,Physical Quantity,Rounding Factor,ISO Code
1010,BA,Tonne (PU),2,10,TNE
1010,BE,Bündel/Gebinde,2,"0,001",

I have tried different variants.
Can you please give me a type?

Thank you
Thomas

Please Log in or Create an account to join the conversation.

More
2 years 2 weeks ago #23956 by admin
Replied by admin on topic CSV - Decimal Question
Hi Thomas

There are multiple ways of doing it.
1 Quote all fields. this is the easiest option.
2 Use script calculation
3 Use contains transformation, this will quote field only if it has a comma inside.

Here is an example of contains transformation.



Mike
ETL Architect

Please Log in or Create an account to join the conversation.

More
2 years 2 weeks ago #23957 by prashant
Replied by prashant on topic CSV - Decimal Question
Thomas,

If you have any control over QLIK QVID output , at least from basic google search it seems there are options available , see 1st result

Your output will look like 
"1010","BE","Bündel/Gebinde","2,0,001"

You can then suggest text qualifier as Mike suggested
 
The following user(s) said Thank You: admin

Please Log in or Create an account to join the conversation.

More
2 years 2 weeks ago - 2 years 2 weeks ago #23958 by downing
Replied by downing on topic CSV - Decimal Question
Thanks guys 
Last edit: 2 years 2 weeks ago by downing.

Please Log in or Create an account to join the conversation.

Cookies user preferences
We use cookies to ensure you to get the best experience on our website. If you decline the use of cookies, this website may not function as expected.
Accept all
Decline all
Read more
Marketing
Set of techniques which have for object the commercial strategy and in particular the market study.
Google
Accept
Decline
Analytics
Tools used to analyze the data to measure the effectiveness of a website and to understand how it works.
Google Analytics
Accept
Decline
Google Analytics
Accept
Decline
Functional
Tools used to give you more features when navigating on the website, this can include social sharing.
Advertisement
If you accept, the ads on the page will be adapted to your preferences.
Google Ad
Accept
Decline
Save