2016深圳市人口普查:请VFP编程高手帮忙写出程序代码!~

来源:百度文库 编辑:查人人中国名人网 时间:2024/04/29 16:49:27
5、有“教师”表,结构为:教工号(c,8),姓名(c,8),职称(c,8)*
“工资”表,结构为:教工号(c,8)基本工资(N,11,2)水电费(N,11,2)实发工资(n,11,2)
请编写根据“职称”加“基本工资”的程序:“正教授”加400、“副教授”加300、“讲师”加200、其它人员加100,。*
6、有“教师”表,结构如下:教工号(c,8),姓名(c,8),职称(c,8),基本工资(n,11,2)
请编写程序,删除“教工号”重复的记录

set talk off
use 教师
repl 基本工资 with 基本工资+400 for 职称="正教授"
repl 基本工资 with 基本工资+300 for 职称="副教授"
repl 基本工资 with 基本工资+200 for 职称="讲师"
repl 基本工资 with 基本工资+100 for 职称="其它"
use
set talk on
return

补充问题
set talk off
use 教师
index on 教工号 tag cc
jgh=教工号
do while not eof()
SKIP
if 教工号=jgh
jgh=教工号
DELE
ELSE
jgh=教工号
endif
enddo
pack
USE
close all
set talk on
return

repl 基本工资 with 基本工资+400 for 职称="正教授"
repl 基本工资 with 基本工资+300 for 职称="副教授"
repl 基本工资 with 基本工资+200 for 职称="讲师"
repl 基本工资 with 基本工资+100 for 职称="其它"

一共四句,简单易行
如果使用sql规范语言,也需要4句,效果一样.