Main   Products   Offshore Outsourcing   Customers   Partners   ContactUs  
JDBC Databases
  HXTT Access v7.0
  HXTT Cobol v4.0
  HXTT DBF v7.0
  HXTT Excel v6.0
  HXTT Paradox v7.0
  HXTT PDF v1.1
  HXTT Text(CSV) v7.0
  Buy Now
  HXTT XML v3.0
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)

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 © 2003-2018 Heng Xing Tian Tai Lab of Xi'an City. | All Rights Reserved. | Privacy | Legal | Sitemap