主题:请教各位大帮忙完善此程序
我是VFP初学者,对VFP还相当不了解,请求各位大帮忙完善下面的句子。
要求:1、实现循环
2、请求各位帮忙修改一下语句,问题相当多、、、谢谢了、、、
clear
@ 0,0 say"1 查询所有不及格的同学的信息"
@ 1,0 say"2 输入一学号,查询此同学的所有课程成绩"
@ 2,0 say"3 输入一姓名,查询此同学的所有课程成绩"
@ 3,0 say"4 输入一课程名,查询该课程的所有同学的成绩信息"
input "请选择:" to a
do case
case a=1
SELECT Student.number, Student.name, Result.coursename, Result.total;
FROM student INNER JOIN result ;
ON Student.number = Result.number;
WHERE Result.total < 60 to screen
return
case a=2
input "请输入学号:" to b
SELECT Student.number, Student.name, Result.coursename, Result.total;
FROM student INNER JOIN result ;
ON Student.number = Result.number;
WHERE Student.number = b to screen
return
case a=3
input "请输入姓名:" to c
SELECT Student.number, Student.name, Result.coursename, Result.total;
FROM student INNER JOIN result ;
ON Student.number = Result.number;
WHERE Student.name = c
return
case a=4
input "请输入课程名:" to d
SELECT Student.number, Student.name, Result.coursename, Result.total;
FROM student INNER JOIN result ;
ON Student.number = Result.number;
WHERE Result.coursename = d
return
endcase
要求:1、实现循环
2、请求各位帮忙修改一下语句,问题相当多、、、谢谢了、、、
clear
@ 0,0 say"1 查询所有不及格的同学的信息"
@ 1,0 say"2 输入一学号,查询此同学的所有课程成绩"
@ 2,0 say"3 输入一姓名,查询此同学的所有课程成绩"
@ 3,0 say"4 输入一课程名,查询该课程的所有同学的成绩信息"
input "请选择:" to a
do case
case a=1
SELECT Student.number, Student.name, Result.coursename, Result.total;
FROM student INNER JOIN result ;
ON Student.number = Result.number;
WHERE Result.total < 60 to screen
return
case a=2
input "请输入学号:" to b
SELECT Student.number, Student.name, Result.coursename, Result.total;
FROM student INNER JOIN result ;
ON Student.number = Result.number;
WHERE Student.number = b to screen
return
case a=3
input "请输入姓名:" to c
SELECT Student.number, Student.name, Result.coursename, Result.total;
FROM student INNER JOIN result ;
ON Student.number = Result.number;
WHERE Student.name = c
return
case a=4
input "请输入课程名:" to d
SELECT Student.number, Student.name, Result.coursename, Result.total;
FROM student INNER JOIN result ;
ON Student.number = Result.number;
WHERE Result.coursename = d
return
endcase