Main   Products   Offshore Outsourcing   Customers   Partners   ContactUs  
JDBC Databases
  HXTT Access 7.1.277
  HXTT Cobol 5.0.275
  HXTT DBF 7.1.277
  HXTT Excel 6.1.279
  HXTT Json 1.0.247
  HXTT Paradox 7.1.275
  HXTT PDF 2.0.275
  HXTT Text(CSV) 7.1.275
 
  Buy Now
  Support
  Download
  Document
  FAQ
  HXTT Word 1.1.275
  HXTT XML 4.0.276
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)
Function substring fails
Remco Schoen
2010-06-25 06:00:34
Hello,

I get an exception using the function substring on a csv-file.

I have this csv-file:

"column1";"column2"
"value1";"value2"
"value12";"value22"

Url: jdbc:csv:/.?delayedClose=0;_CSV_Separator=\x3b;_CSV_Quoter=";_CSV_Header=true
Query: select substring(column1, 1, 10) from substring.csv

The stacktrace:

java.lang.StringIndexOutOfBoundsException: String index out of range: 10
at java.lang.String.substring(String.java:1934)
at com.hxtt.d.d.aL(Unknown Source)
at com.hxtt.d.d.a(Unknown Source)
at com.hxtt.d.k.if(Unknown Source)
at com.hxtt.sql.dj.a(Unknown Source)
at com.hxtt.sql.c1.new(Unknown Source)
at com.hxtt.sql.c1.next(Unknown Source)

With kind regards,

Remco Schoen
Re:Function substring fails
HXTT Support
2010-06-25 06:16:57
Checked SUBSTRING (Transact-SQL):
length_expression:
Is a positive integer or bigint expression that specifies how many characters of the value_expression will be returned. If length_expression is negative, an error is generated and the statement is terminated. If the sum of start_expression and length_expression is greater than the number of characters in value_expression, the whole value expression beginning at start_expression is returned.

We will fix and upload a ltest package in 2 hours.
Re:Re:Function substring fails
Remco Schoen
2010-06-29 01:13:51
Tried with the latest package and works!

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 | Refund | Sitemap