三、
一、建立表文件
CREATE TABLE table3(學號 C(10), 姓名 C(6), 課程名 C(8), 分數(shù) N(5,1))
二、在prog1.prg文件中編寫如下程序:
clear
close all
select 0
use table3
dele all
pack
copy to ttt
select 0
use ttt
select 0
use xuesheng
index on 學號 tag 學號
select 0
use chengji
set relation to 學號 into xuesheng
go top
do while .not.eof()
if 數(shù)學<60
select ttt
append blank
replace 學號 with xuesheng.學號,姓名 with xuesheng.姓名
replace 課程名 with "數(shù)學",分數(shù) with chengji.數(shù)學
select chengji
endif
if 英語<60
select ttt
append blank
replace 學號 with xuesheng.學號,姓名 with xuesheng.姓名
replace 課程名 with "英語",分數(shù) with chengji.英語
select chengji
endif
if 信息技術(shù)<60
select ttt
append blank
replace 學號 with xuesheng.學號,姓名 with xuesheng.姓名
replace 課程名 with "信息技術(shù)",分數(shù) with chengji.信息技術(shù)
select chengji
endif
skip
enddo
select ttt
sort on 分數(shù),學號/d to ttt1
select table3
append from ttt1
close all
相關(guān)鏈接:北京 | 天津 | 上海 | 江蘇 | 山東 |
安徽 | 浙江 | 江西 | 福建 | 深圳 |
廣東 | 河北 | 湖南 | 廣西 | 河南 |
海南 | 湖北 | 四川 | 重慶 | 云南 |
貴州 | 西藏 | 新疆 | 陜西 | 山西 |
寧夏 | 甘肅 | 青海 | 遼寧 | 吉林 |
黑龍江 | 內(nèi)蒙古 |