【发布时间】:2015-04-25 08:42:56
【问题描述】:
我有一个关系,它有大约 5000 条记录。
问题:
假设我有 1 条记录:
姓名:“亚当”,家庭:“白”,数据:“003*12/12/12”, 父亲:'杰克'
当我搜索时:
select * from tbl_r1 where 1=1 and father='adam';//return 0 record
或
select * from tbl_r1 where 1=1 and father='jack';//return 1 record
效果很好,但是:
select * from tbl_r1 where 1=1 and father='adam' and
CONVERT(substring(data from 1 for 3),BigInt)= 3;
它抛出异常“
StringIndexOutOfBoundsException :-7" 或 -80
等等
这个查询在 postgresql 中没问题,因为我是按父亲名字过滤的...
【问题讨论】:
标签: postgresql hsqldb indexoutofboundsexception