select substr("test/db/aaaa测试aaa.cpt",length("test/db/aaaa测试aaa.cpt")-instr(reverse("test/db/aaaa测试aaa.cpt"),"/")+2,instr("test/db/aaaa测试aaa.cpt",".")-length("test/db/aaaa测试aaa.cpt")+instr(reverse("test/db/aaaa测试aaa.cpt"),"/")-2) as T
上面是测试脚本,直接看下面结果...
你把
test/db/aaaa测试aaa.cpt
切换成对应的表字段名..
比如:
select substr(TNAME,length(TNAME)-instr(reverse(TNAME,"/")+2,instr(TNAME,".")-length(TNAME)+instr(reverse(TNAME),"/")-2) as T from FR_EXERECORD