回复 楼主 随 缘
CLOSE DATABASES CREATE CURSOR tt (单位 C(4),姓名 C(4),奖金 N(3))
INSERT INTO tt VALUES ("1班","张一",100)
INSERT INTO tt VALUES ("2班","李二",100)
INSERT INTO tt VALUES ("3班","王五",200)
INSERT INTO tt VALUES ("1班","",300)
INSERT INTO tt VALUES ("4班","张三",150)
INSERT INTO tt VALUES ("2班","李四",120)
INSERT INTO tt VALUES ("4班","",800)
SELECT * FROM tt ORDER BY 单位,姓名 INTO cursor pp readwrite
replace ALL 姓名 WITH "集体" FOR EMPTY(姓名)