CREATE CURSOR tt (djf C(9), djf1 C(20))
INSERT INTO tt (djf) VALUES ("BCBABBAAA")
INSERT INTO tt (djf) VALUES ("BDBBBCCBA")
INSERT INTO tt (djf) VALUES ("ABAAABAAA")
INSERT INTO tt (djf) VALUES ("ACDBBBBBA")
INSERT INTO tt (djf) VALUES ("ADBBABBAA")
REPLACE ALL DJF1 WITH iif(occurs("A", djf) > 0, str(occurs("A", djf), 1) + "A", "") + ;
iif(occurs("B", djf) > 0, str(occurs("B", djf), 1) + "B", "") + ;
iif(occurs("C", djf) > 0, str(occurs("C", djf), 1) + "C", "") + ;
iif(occurs("D", djf) > 0, str(occurs("D", djf), 1) + "D", "")
BROWSE
按照TONGDENG版主的说法这叫硬编码
INSERT INTO tt (djf) VALUES ("BCBABBAAA")
INSERT INTO tt (djf) VALUES ("BDBBBCCBA")
INSERT INTO tt (djf) VALUES ("ABAAABAAA")
INSERT INTO tt (djf) VALUES ("ACDBBBBBA")
INSERT INTO tt (djf) VALUES ("ADBBABBAA")
REPLACE ALL DJF1 WITH iif(occurs("A", djf) > 0, str(occurs("A", djf), 1) + "A", "") + ;
iif(occurs("B", djf) > 0, str(occurs("B", djf), 1) + "B", "") + ;
iif(occurs("C", djf) > 0, str(occurs("C", djf), 1) + "C", "") + ;
iif(occurs("D", djf) > 0, str(occurs("D", djf), 1) + "D", "")
BROWSE
按照TONGDENG版主的说法这叫硬编码
坚守VFP最后的阵地