我有个亲戚,大约有5000张唱片。
问题
假设我有一张唱片:
姓名:'adam‘,家庭:'white’,资料:‘003*12/12/12’,父亲:‘jack’
当我搜索:
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中是可以的,因为我按父名过滤了.
发布于 2015-04-25 13:23:34
这适用于最新版本的HSQLDB (2.3.3)。
https://stackoverflow.com/questions/29862996
复制相似问题