Hello,
The HXTTText driver throws java.sql.SQLException: Invalid column when a column has " as a quote in the column name.
Regards.
K. Ateyeh
|
You can use the follows sql:
select name [aaa"] from table1
|
The problem is that in case that i the column name are quoted like "name" the driver consider the column name as "name" and not name.
Regards.
K. Ateyeh
|
Please download the latest HXTT Text JDBC Package and try again.
If this problem happened yet,can you tell us your sql?
When i execute the follows sql,
select Name "Name" from table1
The column name is name and not "name"
|
Hi,
i think, finally, i found the bug.
The Hxtttext driver provide rong results in this case:
when having a csv file that has ";" separator and one or more column names are quoted with " like "name" then this sql:
ResultSet rs = stmt.executeQuery("SELECT * FROM table");
ResultSetMetaData rsm = rs.getMetaData();
the rsm would include this: ""name"" instad of "name".
Regards.
K. Ateyeh
|
It's not a bug.
If you use
url="jdbc:text:////f:/textfiles?_CSV_Separator=\\x3b;_CSV_Header=true;csvfileExtension=CSV;_CSV_Quoter=\";"
you will find that your issue disappear.
Without _CSV_Quoter=" property, HXTT CSV will think that your csv file with ";" separator hasn't quoter token. For standard csv file, it will check " token always.
|