Main   Products   Offshore Outsourcing   Customers   Partners   ContactUs  
JDBC Databases
  HXTT Access 7.1.252
  HXTT Cobol 5.0.251
  HXTT DBF 7.1.252
  HXTT Excel 6.1.255
  HXTT Json 1.0.223
  HXTT Paradox 7.1.251
  HXTT PDF 2.0.251
  HXTT Text(CSV) 7.1.251
 
  Buy Now
  Support
  Download
  Document
  FAQ
  HXTT Word 1.1.251
  HXTT XML 4.0.252
Offshore Outsourcing
Free Resources
  Firewall Tunneling
  Search Indexing Robot
  Conditional Compilation
  Password Recovery for MS Access
  Password Recovery for Corel Paradox
  Checksum Tool for MD5
  Character Set Converter
  Pyramid - Poker of ZYH
   
   
   
Heng Xing Tian Tai Lab of Xi'an City (abbr, HXTT)

HXTT Text(CSV)
Error truncate blank strings in flat text file
Gustavo Ruiz
2014-08-05 16:06:48
Hi, i'm executing a create table and insert records in flat text file but i found an error when insert string with blank spaces.

My connection is:
jdbc:csv:////tmp?csvfileExtension=ASC;_CSV_Header=false;emptyStringAsNull=false;

Create table SQL:
CREATE TABLE CLIENTES2(Company CHAR(2), CustomerNbr CHAR(9), AddressCode CHAR(3), Tel2 CHAR(15) NOT NULL DEFAULT '#TEL2 #', Fax CHAR(15), ContactName CHAR(30), Contry CHAR(3), CustFamily CHAR(3), Language CHAR(3), Currency
CHAR(3), DeftCarrAcc CHAR(20), DunsNo CHAR(10), SupplierNbr CHAR(10), DeftCarr CHAR(3), Account CHAR(3), CustServRep CHAR(3), XaCustomerNbr CHAR(10), IRSNumber CHAR(15), TaxCode1 CHAR(3), PaymentCode CHAR(3), DueDateCode CHAR(4), Comments CHAR(30), ShipToLocCde CHAR(20), CustStillNbr CHAR(10), _CSV_Separator char(0))

Insert SQL:
INSERT INTO CLIENTES2(Company,CustomerNbr,AddressCode,Tel2,Fax,ContactName,Contry,CustFamily,Language,Currency,DeftCarrAcc,DunsNo,SupplierNbr,DeftCarr,Account,CustServRep,XaCustomerNbr,IRSNumber,TaxCode1,PaymentCode,DueDateCode,Comments,ShipToLocCde,CustStillNbr) VALUES(?,?,?,?,?,?,?,?,?,?,?,?,?,?,?,?,?,?,?,?,?,?,?,?)
VALUES: [01, 000475210, 999, null, , , , , 000, , , , , , 000, 000, , , 000, 000, 0000, , , ]

And the result in the text file is:
010004752109990000000000000000000

And the expected result is something similar to this:
01000475210999 000 000 0000000000000

What im missing in configuration for the driver truncate all the blank string with empty spaces?

Best regards.

Search Key   Search by Last 50 Questions




Google
 

Email: webmaster@hxtt.com
Copyright © 2003-2019 Heng Xing Tian Tai Lab of Xi'an City. | All Rights Reserved. | Privacy | Legal | Sitemap