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

Function substring fails
Remco Schoen
2010-06-25 06:00:34

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

I have this csv-file:


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(
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 Source)
at Source)
at Source)

With kind regards,

Remco Schoen
Re:Function substring fails
HXTT Support
2010-06-25 06:16:57
Checked SUBSTRING (Transact-SQL):
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


Copyright © 2003-2019 Heng Xing Tian Tai Lab of Xi'an City. | All Rights Reserved. | Privacy | Legal | Sitemap