Driver converts non-doubles to doubles |
Remco Schoen |
2009-09-04 07:58:19 |
Hello,
If I have a record like this in csv:
1;1.000,1;1,000.1;"1.000,0"
It also returns the third and fourth column as a double. The third column isn't a valid double, so I would expect a longvarchar. The fourth column has quotes around it indicating a LONGVARCHAR and still is getting parsed as a double.
Is this the correct behaviour?
With kind regards,
Remco Schoen
Currently researching the usability of the driver for use in our product TOPdesk
|
Re:Driver converts non-doubles to doubles |
HXTT Support |
2009-09-06 09:43:12 |
|
Supported. Please download the latest pacakge, which won't use ',' as default decimalSeparator.
|
Re:Re:Driver converts non-doubles to doubles |
Remco Schoen |
2009-09-08 07:09:59 |
With the driver version 2.2.087 the problem still persists.
With decimalSeparator=,;groupingSeparator=. it returns the value 1,000.1 as a double 1.0, it seems to neglect the .1 at the end.
The value "1.000,1" still gets returned as a double, although it is a string.
|
Re:Re:Re:Driver converts non-doubles to doubles |
HXTT Support |
2009-09-08 07:41:18 |
|
You can use decimalSeparator=;groupingSeparator= or remove simply both connection properties form your url. Then it won't be parse as double.
|
Re:Re:Re:Re:Driver converts non-doubles to doubles |
Remco Schoen |
2009-09-08 08:12:25 |
But then my doubles as well aren't read as doubles and that would mean it is not possible to have a table with multiple data types.
And not setting the connection properties at all gives the same problem, but the other way around.
|
Re:Re:Re:Re:Re:Driver converts non-doubles to doubles |
HXTT Support |
2009-09-08 08:28:35 |
>The value "1.000,1" still gets returned as a double, although it is a string.
HXTT Text will detect it, and remove ".
>it returns the value 1,000.1 as a double 1.0, it seems to neglect the .1
>at the end.
Yeah. It seems lame, and we will try to find a solution.
|
Re:Re:Re:Re:Re:Re:Driver converts non-doubles to doubles |
HXTT Support |
2009-09-08 08:41:58 |
>it returns the value 1,000.1 as a double 1.0, it seems to neglect the .1
>at the end.
A double with 1.0001 or a string "1,000.1", what's your want result?
|
Re:Re:Re:Re:Re:Re:Re:Driver converts non-doubles to doubles |
Remco Schoen |
2009-09-08 08:55:14 |
|
I would expect a string, because it doesn't look like a double. The point is a thousand separator and can not come after the decimal separator.
|
Re:Re:Re:Re:Re:Re:Re:Re:Driver converts non-doubles to doubles |
HXTT Support |
2009-09-09 09:04:36 |
|
Supported.
|
Re:Re:Re:Re:Re:Re:Re:Re:Driver converts non-doubles to doubles |
Remco Schoen |
2009-09-10 04:10:15 |
This works now for the use-case of 1.000,1, it returns a longvarchar now.
Let me explain the other case with the quotes and why I test it like that. We get data-files from our customers and they can contain personnelnumbers. With most companies this is a number, but sometimes it can be a string as well and most times it is exported as a string with quotes. An example of these strings could be, that they put an E in front of the number, when it is an external person.
If this number with an E appears after the rows, that are examined for type guessing, the reading will fail with an exception, that it can not convert the value to a number.
That is why we ask our customers to add quotes to strings, so that it is for certain a string when reading the file. The ODBC driver of Microsoft does also see these values as strings, when they have quotes.
I hope this use-case is clear and can be supported.
|
Re:Re:Re:Re:Re:Re:Re:Re:Driver converts non-doubles to doubles |
HXTT Support |
2009-09-10 22:26:02 |
|
Supported. Please download the latest package.
|
Re:Re:Re:Re:Re:Re:Re:Re:Driver converts non-doubles to doubles |
Remco Schoen |
2009-09-15 03:33:40 |
|
Cool, this now works as expected.
|