Skip to content

CSVRead: Fails to translate empty Numbers, when cells are quoted #3785

@manticore-projects

Description

@manticore-projects

CSV File `sample.csv'

"Test"
"100.22"
""

Import via CsvRead

CREATE TABLE TEST(TEST DECIMAL(12,2) NULL);
INSERT INTO TEST SELECT * FROM CsvRead('sample.csv');

Will fail at row 2 with

org.h2.jdbc.JdbcSQLDataException: Data conversion error converting "'' (TEST: ""TEST"" DECIMAL(12, 2))";

Reason: the empty String '' is not interpreted as NULL, but instead forwarded to a call of new BigDecimal('') which will fail.

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions