:
*******************found******************** x,s1,s2,s3=0 ---->>>>> store 0 to x,s1,s2,s3 *******************found******************** x=thisform.text1 ---->>>>> x=thisform.text1.value do while x>0
if int(x/2)=x/2 s1=s1+1 else
s2=s2+1 endif
*******************found******************** if div(x,3)=0 ---->>>>> if mod(x,3)=0 s3=s3+1 endif x=x-1 enddo
thisform.text2.value=s1 thisform.text3.value=s2 thisform.text4.value=s3
thisform.text5.value=s1+s2+s3 综合应用:
thisform.list2.add(thisform.list1.value) 改成
thisform.list2.additem(thisform.list1.value) thisform.list2.delete(thisform.list2.listindex) 改成
thisform.list2.removeitem(thisform.list2.listindex) 差的语句
SELECT Student.姓名, Course.课程名称, Score.考试成绩; FROM student INNER JOIN score; INNER JOIN course ;
ON Score.课程编号 = Course.课程编号 ; ON Student.学号 = Score.学号; where &cn;
ORDER BY Course.课程名称, Score.考试成绩 DESC; INTO TABLE zonghe
第四题:
* 修改所有*** FOUND ***下面的一条语句。
* 不能修改其他语句。不能增加语句,也不能删除语句。 下一题
第一处错误修改为:FOR i=1 TO thisform.List1.ListCount 第二处错误修改为:s=thisform.List1.list(i)
第三处错误修改为:s=s+hisform.List1.list(i) 第七题:
*在第2行有一处错误,第3行有两处错误,请改正 select p.组别,c.姓名 组长,p.姓名 组员 ;
from employee p ,employee c ; -- from employee p join employee c; on p.组别=c.组别 where p.职务=\"组长\" and c.姓名=p.姓名;
-------->>> on p.组别=c.组别 where c.职务=\"组长\" and c.姓名!=p.姓名; order by p.组别
第八题: set talk off set safety off
*产生goods表的一个副本
select * from goods into table goods_t close all select 3 use goods_t
index on 商品号 tag sph select 2
use orderitems
index on 订单号 tag ddh
*通过“商品号”建立当前表与goods_t表之间的关联 set relation to 商品号 into goods_t &&语句 1 select 1 use orders
index on 签订日期 tag rq
*通过“订单号”建立当前表与orderitems表之间的关联 set relation to 订单号 into orderitems &&语句 2 go top
do while !eof()
*取出当前订单的订单号 sddh = 订单号 flag = .T. n = 0
select orderitems
*依次检查当前订单的各订单项商品是否有足够的库存量 do while 订单号=sddh and !eof()
*如果订购数量大于库存量则将flag设置成.F.,并退出循环语句 if 数量>goods_t.库存量 &&语句 3 flag = .F. exit endif n = n+1 skip
enddo if flag
*请使用SKIP语句将当前表orderitems的记录指针重新移至当前订单的第一条订单项记录上
skip –n &&语句 4
*依次处理当前订单的各订单项 do while 订单号=sddh and !eof() select goods_t
*将商品的库存量减少订购数量
replace 库存量 with 库存量-orderitems.数量 &&语句 5 select orderitems skip enddo
select orders
replace 状态 with \"处理\" else
select orders
replace 状态 with \"缺货\" endif skip enddo
close all set safety on set talk on 改成
SELECT 系名,avg(工资) as 平均工资,max(工资) as 最高工资; FROM 教师表, 学院表 WHERE 教师表.系号 = 学院表.系号; GROUP BY 学院表.系号;
ORDER BY 3 DESC,2 DESC; INTO table three
select 职称级别,基本工资 from 职称表 where 职称名=\"教授\" to dbf prof.dbf group by 基本工资 改成:
select 职称级别,基本工资 from 职称表 where 职称名=\"教授\" into dbf prof.dbf order by 基本工资
因篇幅问题不能全部显示,请点此查看更多更全内容
Copyright © 2019- huatuo3.cn 版权所有 湘ICP备2023017654号-3
违法及侵权请联系:TEL:199 1889 7713 E-MAIL:2724546146@qq.com
本站由北京市万商天勤律师事务所王兴未律师提供法律服务