CLOSE DATABASES
USE cl IN 0 ALIAS tt
czdm="保单号 c(20)"
czd=""
FOR i=1 TO 12
czdm=czdm+",列"+TRANSFORM(i)+" C(14)"
czd=czd+IIF(EMPTY(czd),"",",")+"列"+TRANSFORM(i)
ENDFOR
CREATE CURSOR 分割 (&czdm)
SELECT tt
SCAN
INSERT INTO 分割 (保单号) VALUES (tt.保单号)
=ALINES(arq,SUBSTR(日期,2),"$")
REPLACE FROM ARRAY arq FIELDS &czd IN 分割
ENDSCAN
SELECT 分割
BROWSE
USE cl IN 0 ALIAS tt
czdm="保单号 c(20)"
czd=""
FOR i=1 TO 12
czdm=czdm+",列"+TRANSFORM(i)+" C(14)"
czd=czd+IIF(EMPTY(czd),"",",")+"列"+TRANSFORM(i)
ENDFOR
CREATE CURSOR 分割 (&czdm)
SELECT tt
SCAN
INSERT INTO 分割 (保单号) VALUES (tt.保单号)
=ALINES(arq,SUBSTR(日期,2),"$")
REPLACE FROM ARRAY arq FIELDS &czd IN 分割
ENDSCAN
SELECT 分割
BROWSE
坚守VFP最后的阵地