SELECT name FROM k0110_6 INTO ARRAY a WHERE fz=1 ORDER BY dc
cSql = ''
FOR i = 1 TO _tally cSql =cSql +','+ a[i] + ' C(10)'
NEXT
cSql = '('+SUBSTR(cSql,2) + ')'
CREATE CURSOR t1 &cSql
APPEND BLANK
APPEND BLANK
SELECT k0110_6
SCAN FOR fz = 1 SELECT t1 REPLACE RECORD 1 (k0110_6.name) WITH STR(k0110_6.hm) REPLACE RECORD 2 (k0110_6.name) WITH k0110_6.dwjc
ENDSCAN
SELECT t1
BROWSE