Import CSV -- Datatypes are reverted when error occurs
started a topic
over 9 years ago
[This topic is migrated from our old forums. The original author name has been removed]
When I tried to import a CSV into a table, I had to adjust some data types
on some of the columns from what dbVis initialy detected it to be +(btw the detection is not accurate; i.e value of 001 would be detected as numeric, when it is realy a text, if it is a 0 by itself, i guess you can make a good guess that its a text...)+
After clicking Next when the wizard was ready to import the data into the table, I started the import. The import aborted telling me that some convertion error have occured. When I clicked the Back button, the datatype were again reverted to what dbVis detected initially and did not save the data types that were indicated by me.
Product: DbVisualizer Personal 188.8.131.52
Build: #1329 (2008/09/02 16:03)
Java VM: Java HotSpot(TM) Client VM
Java Version: 1.6.0_05
Java Vendor: Sun Microsystems Inc.
OS Name: Windows XP
OS Arch: x86
OS Version: 5.1
over 9 years ago
[This reply is migrated from our old forums.]
Re: Import CSV -- Datatypes are reverted when error occurs
The problem with manually set data types being reset when you go back to the format pane will be fixed in the next version.
For the time being, we will not change the algorithm for data type detection, so 001 will continue to be detected as a number. The data type is determined based on the values in the number of "preview rows", so as long as there's at least one row with a value containing other characters besides digits, the column will be interpreted as "String".