how to have csvq treating double quotation marks just as normal characters? #82
-
|
given a file test.csv containing and performing a simple select i checked the flags description and thought that @@ANSI_QUOTES might have interfered but since if the double quotation character is put to the middle position on that line (e.g. |
Beta Was this translation helpful? Give feedback.
Replies: 2 comments
-
|
There is no way to make the quotation mark at the beginning of a field be interpreted as part of the value. CSV data are read according to RFC 4180.
In csvq, if there are double quotation marks in the middle of an unenclosed field, they are interpreted as part of the field value and read as is, but if the field begins with a double quotation mark, it is interpreted as an enclosure. |
Beta Was this translation helpful? Give feedback.
-
|
Thanks for that concise answer which helped me a lot to better understand how While playing around with this I also found that fixed width data is treated differently: That is of course in line with what you stated above but might be worth noting when deciding how to read data into |
Beta Was this translation helpful? Give feedback.
There is no way to make the quotation mark at the beginning of a field be interpreted as part of the value.
The effect of the @@ANSI_QUOTES flag is applies to executable statements, not to data to be read.
CSV data are read according to RFC 4180.
Therefore, fields containing double quotation marks must be enclosed with double quotation marks and escaped.