Main   Products   Offshore Outsourcing   Customers   Partners   ContactUs  
JDBC Databases
  HXTT Access v5.2
  HXTT Cobol v2.1
  HXTT DBF v5.2
  HXTT Excel v4.2
  HXTT Paradox v5.2
  HXTT Text(CSV) v5.2
  Buy Now
  HXTT XML v1.2
Offshore Outsourcing
Oracle Data Import/Export
DB2 Data Import/Export
Sybase Data Import/Export
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 Xin Tian Tai Ltd. of Beijing City (abbr, HXTT)

Error truncate blank strings in flat text file
Gustavo Ruiz
2014-08-05 16:06:48.0
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:

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:

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


Copyright © 1999-2017 Heng Xin Tian Tai Ltd. of Beijing City. | All Rights Reserved. | Privacy | Legal | Sitemap