VF6.0相临字符串的检索
TABLE中有如下字符字段:
199501
199502
199602
199603
198701
198706
200001
200002
求如何把如199501和199502,199602和199603,200012,200101这样相临的字符串检索出来,感谢了
[解决办法]
SELECT a.* FROM dd a INNER JOIN dd b;
ON VAL(a.bh)=VAL(b.bh)+1;
union;
SELECT a.* FROM dd a INNER JOIN dd b;
ON VAL(a.bh)=VAL(b.bh)-1