Main   Products   Offshore Outsourcing   Customers   Partners   ContactUs  
JDBC Databases
  HXTT Access v6.0
  HXTT Cobol v3.0
  HXTT DBF v6.0
  HXTT Excel v5.0
  HXTT Paradox v6.0
  HXTT Text(CSV) v6.0
  Buy Now
  HXTT XML v2.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 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 Xing Tian Tai Ltd. of Beijing City. | All Rights Reserved. | Privacy | Legal | Sitemap