The hxtttext driver data type detection creates wrong data types.
(see example below) the driver considers the column: cause_value as DOUBLE and cause_location ans Time bot are of ty Integer.
Regards
K. Atyeh
-----------------------------
vnk_id|vk|ubn|uon|zrn|zbn|begdat_uhr|dvm|gd|ei|tmr|dienst_typ|cause_value|cause_location|ukk_ind|ukk_1|ukk_2
vnk11|40|B105E5|410aaa|004218231aaaffffffff|B104E |2005-01-31 00:23:17|1|0|0|3|00|03|02|10000100|92|02
vnk11|40|B039E |4367aa|00905375048aaaffffff|O525E |2005-01-31 00:23:17|1|0|0|0|00|11|04|10000100|a3|02
vnk11|40|I630E |486944|0180aaaaaaafffffffff|B514F |2005-01-31 00:23:06|22|12|1|0|00|10|00|10000100|a7|04
|
I created a texttype.txt file according to your three rows sample, and use the following url:
jdbc:text:////f:/textfiles?_CSV_Separator=|;_CSV_Header=true;csvfileExtension=TXT
but got the correct type:
select * from testtype
vnk_id LONGVARCHAR
vk INTEGER
ubn LONGVARCHAR
uon LONGVARCHAR
zrn LONGVARCHAR
zbn LONGVARCHAR
begdat_uhr TIMESTAMP
dvm INTEGER
gd INTEGER
ei INTEGER
tmr INTEGER
dienst_typ INTEGER
cause_value INTEGER
cause_location INTEGER
ukk_ind INTEGER
ukk_1 LONGVARCHAR
ukk_2 INTEGER
vnk11 13360 B105E5 410aaa 004218231aaaffffffff B104E 2005-01-31 00:23:17.0 49 48 48 51 12336 12339 12338 808529968 92 12338
vnk11 13360 B039E 4367aa 00905375048aaaffffff O525E 2005-01-31 00:23:17.0 49 48 48 48 12336 12593 12340 808529968 a3 12338
vnk11 13360 I630E 486944 0180aaaaaaafffffffff B514F 2005-01-31 00:23:06.0 12850 12594 49 48 12336 12592 12336 808529968 a7 12340
The total row number of resultset: 3
|
Hi,
I think the driver considers the column cause_location as Time because its values always begin with 0. Is this correct?
regards.
K. Ateyeh
|
You're correct. v3.0.001 fixed a bug in parsing int column since v2.3.038. Thanks. Please download the latest package.
The correct result should be:
2 vnk11 40 B105E5 410aaa 004218231aaaffffffff B104E 2005-01-31 00:23:17.0 1 0 0 3 0 3 2 10000100 92 2
4 vnk11 40 B039E 4367aa 00905375048aaaffffff O525E 2005-01-31 00:23:17.0 1 0 0 0 0 11 4 10000100 a3 2
0 vnk11 40 I630E 486944 0180aaaaaaafffffffff B514F 2005-01-31 00:23:06.0 22 12 1 0 0 10 0 10000100 a7 4
The total row number of resultset: 3
|
Hi,
the name of the package has changed! You gave it the name "Text JDBC 2.0 package". Is this a mistake??
Regards.
K. Ateyeh
|
|
JDBC 3.0(2.0, or 1.2) package means JDBC 3.0(2.0, or 1.2) specification. v3.0 means the version of HXTT Text (CSV).
|