Hi All,
As per requirement, I have to send data in CSV with pipe separated, but for decimal data as highlighted in screenshot, its appending with ' before the actual value in the decimal.
I'm using a DB view to construct the required data and pass it to Export Data Store Entity to CSV smart service in PM. In the DB data is normal but while it's generated in CSV the below highlighted issue is observed. Any leads on this issue are greatly appreciated.
Expected --> -92333.00000 Actual --> '-92333.00000
Thanks & Regards
Kumudini
Discussion posts and replies are publicly visible
I suggest to validate the Table structure that the data type in table is Decimal only, I tried to use the DSE to CSV smart service with negative decimal values in the DB and it is exporting as expected. Also check if the CDT and the Table have the same data type.
Other than the suggestion above, I might try casting the value to varchar() in the view and updating the CDT to string, to see if that resolves.
It is excel's way of displaying the numeric value in text. " ' " is not part of actual value. Try to view .csv in text editor and you won't see " ' ".
Hi Abhay,
I tried opening it with my text editor, but for my case the special character is actually part of the value. The number is of type string in the database. Otherwise large numbers would be converted to scientific notation, so something like 7+e, when converting to CSV.
Do you know a way to either
- remove/prevent the special character
or
- convert numbers to CSV without scientific notation?
Thanks!
you can convert a number with scientific notation to normal text string using fixed() function.