缺乏内置的向后INSTR
使这个查询变得疯狂!!!
对于正好 6 个字段,它就像:
SELECT ROWID FROM mark WHERE 250 >= CAST(SUBSTR(pointer,1, INSTR(pointer, ",")-1) AS
INT) AND 250<CAST(SUBSTR(SUBSTR(SUBSTR(SUBSTR(SUBSTR(pointer,INSTR(pointer,",")+1),
INSTR(SUBSTR(pointer,INSTR(pointer,",")+1),",")+1), INSTR(SUBSTR(SUBSTR(pointer,
INSTR(pointer,",")+1),INSTR(SUBSTR(pointer,INSTR(pointer,",")+1),",")+1),",")+1),
INSTR(SUBSTR(SUBSTR(SUBSTR(pointer,INSTR(pointer,",")+1),INSTR(SUBSTR(pointer,
INSTR(pointer,",")+1),",")+1),INSTR(SUBSTR(SUBSTR(pointer,INSTR(pointer,",")+1),
INSTR(SUBSTR(pointer,INSTR(pointer,",")+1),",")+1),",")+1),",")+1),INSTR(SUBSTR(
SUBSTR(SUBSTR(SUBSTR(pointer,INSTR(pointer,",")+1),INSTR(SUBSTR(pointer,
INSTR(pointer,",")+1),",")+1),INSTR(SUBSTR(SUBSTR(pointer,INSTR(pointer,",")+1),
INSTR(SUBSTR(pointer,INSTR(pointer,",")+1),",")+1),",")+1),INSTR(SUBSTR(SUBSTR(
SUBSTR(pointer,INSTR(pointer,",")+1),INSTR(SUBSTR(pointer,INSTR(pointer,",")+1)
,",")+1),INSTR(SUBSTR(SUBSTR(pointer,INSTR(pointer,",")+1),INSTR(SUBSTR(pointer,
INSTR(pointer,",")+1),",")+1),",")+1),",")+1),",")+1) AS INT);
我建议你使用一个计算有问题的临时表代替这个......