回复 6楼 zysoft888
CREATE CURSOR tt (代码 C(20), 名称 C(40))
INSERT INTO tt VALUES ("5602", "管理费用")
INSERT INTO tt VALUES ("560201", "差旅费")
INSERT INTO tt VALUES ("56020101", "市内差旅费")
INSERT INTO tt VALUES ("56020102", "外地差旅费")
INSERT INTO tt VALUES ("4001", "财政拨款收入")
INSERT INTO tt VALUES ("400101", "基本支出")
INSERT INTO tt VALUES ("40010101", "人员经费")
INSERT INTO tt VALUES ("40010102", "公用经费")
INSERT INTO tt VALUES ("400102", "项目支出")
INSERT INTO tt VALUES ("4201", "上级补助收入")
INSERT INTO tt VALUES ("420101", "非专项收入")
INSERT INTO tt VALUES ("420102", "专项收入")
INSERT INTO tt VALUES ("4601", "非同级财政拨款收入")
INSERT INTO tt VALUES ("460101", "非专项收入")
INSERT INTO tt VALUES ("460102", "专项收入")
INSERT INTO tt VALUES ("4603", "捐赠收入")
INSERT INTO tt VALUES ("4604", "利息收入")
INSERT INTO tt VALUES ("4605", "租金收入")
INSERT INTO tt VALUES ("4609", "其他收入")
INSERT INTO tt VALUES ("460901", "非专项收入")
INSERT INTO tt VALUES ("460902", "专项收入")
INSERT INTO tt VALUES ("5001", "业务活动费用")
INSERT INTO tt VALUES ("500101", "财政补助费用")
INSERT INTO tt VALUES ("50010101", "基本支出费用")
INSERT INTO tt VALUES ("5001010101", "工资福利费用")
INSERT INTO tt VALUES ("500101010101", "基本工资")
INSERT INTO tt VALUES ("500101010102", "津贴补贴")
INSERT INTO tt VALUES ("50010101010201", "国家津贴")
INSERT INTO tt VALUES ("50010101010202", "国家补贴")
INSERT INTO tt VALUES ("50010101010203", "地方性津补贴")
INSERT INTO tt VALUES ("50010101010204", "高寒缺氧补贴")
INSERT INTO tt VALUES ("50010101010205", "采暖补贴")
INSERT INTO tt VALUES ("50010101010206", "乡镇岗位津贴")
INSERT INTO tt VALUES ("50010101010299", "其他津补贴")
INSERT INTO tt VALUES ("500101010103", "奖金")
INSERT INTO tt VALUES ("500101010104", "其他社会保障缴费")
INSERT INTO tt VALUES ("500101010105", "绩效工资")
INSERT INTO tt VALUES ("50010101010501", "基础性绩效")
INSERT INTO tt VALUES ("50010101010502", "奖励性绩效")
INSERT INTO tt VALUES ("500101010106", "基本养老保险缴费")
INSERT INTO tt VALUES ("500101010107", "职业年金缴费")
INSERT INTO tt VALUES ("500101010108", "基本医疗保险缴费")
INSERT INTO tt VALUES ("500101010109", "住房公积金")
INSERT INTO tt VALUES ("500101010199", "其他工资福利费用")
INSERT INTO tt VALUES ("5001010102", "商品服务费用")
INSERT INTO tt VALUES ("500101010201", "办公费")
INSERT INTO tt VALUES ("500101010202", "印刷费")
INSERT INTO tt VALUES ("500101010203", "咨询费")
INSERT INTO tt VALUES ("500101010204", "手续费")
SELECT 代码, SPACE(200) 科目全称 FROM tt INTO CURSOR tmp READWRITE
SELECT tt
INDEX on 代码 TAG km
SELECT tmp
SCAN
kmm = SUBSTR(代码,1,4)
km = kmm
=SEEK(km,"tt")
kn = tt.名称
n = 5
kmm = SUBSTR(代码,n,2)
DO WHILE !EMPTY(kmm)
km = km + kmm
=SEEK(km,"tt")
kn = kn - "-" - tt.名称
n = n+2
kmm = SUBSTR(代码,n,2)
ENDDO
REPLACE 科目全称 WITH kn
ENDSCAN
BROWSE
RETURN