Skip to content

Import Table from CSV is Not Preserving Quoted Values as Text #1382

@frankpd

Description

@frankpd

Details for the issue

Problem: Import Table from CSV is not preserving quoted values as text.

Using Import - Table from CSV File, I am trying to import this csv file into an empty database. Values are double quoted to indicate that they should be preserved as text - for example, the FIPS column contains values that are five digit numbers with leading zeros, and these values are all double quoted.

When I import CSV, I leave the default quote character choice as double quotes, and the FIPS values I see in the preview look fine. But when I hit OK, it does the import and saves this column as an Integer, ignoring the double quotes. As a result the leading zeros from the values are dropped and the codes are no longer correct.

I tried all of the following, with no effect: leaving the trim option off, going under View - Preferences - Database and changing the default field type from Integer to Text, adding an integer id column in the CSV before the FIPS column (in case the first column is reserved as an integer key column), using single instead of double quotes to preserve text.

I'm using Version 3.10.99 SQLite Version 3.11.0. I'm running 64-bit Linux Mint 18.2 and am using the linuxgndu sqlitebrowser for ubuntu xenial.

import_csv
import_integers
zeros_dropped

Useful extra information

I'm opening this issue because:

  • DB4S is crashing
  • [ x] DB4S has a bug
  • DB4S needs a feature
  • DB4S has another problem

I'm using DB4S on:

  • Windows: ( version: ___ )
  • [x ] Linux: ( distro: ubuntu xenial___ )
  • Mac OS: ( version: ___ )
  • Other: ___

I'm using DB4S version:

  • 3.10.1
  • 3.10.0
  • 3.9.1
  • [ x] Other: 3.10.99_

I have also:

Metadata

Metadata

Assignees

No one assigned

    Labels

    bugConfirmed bugs or reports that are very likely to be bugs.

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions