1.(共40分)本大題不給參考答案。評(píng)分標(biāo)準(zhǔn)如下:
4) 正確建立2個(gè)表的數(shù)據(jù)結(jié)構(gòu)(表結(jié)構(gòu)設(shè)計(jì)正確)20分
5) 數(shù)據(jù)正確15分
6) 永久關(guān)聯(lián)正確5分
2.
1)Select top 1 xs.營(yíng)銷員,yx.姓名,職務(wù);
from yx inner join xs on xs.銷售員編號(hào)=yx.營(yíng)銷員編號(hào);
order by 數(shù)量 desc
2)
select yx.姓名,產(chǎn)品編號(hào),數(shù)量*單價(jià) as 銷售金額,銷售月份;
from yx inner join xs on xs.營(yíng)銷員編號(hào)=yx.營(yíng)銷員編號(hào);
where xs.營(yíng)銷員編號(hào)=any(select yx.營(yíng)銷員編號(hào) from yx where 職務(wù)='主管')
3)
select 數(shù)量*單價(jià) as 銷售金額,銷售月份;
form xs;
group by 銷售月份
3.
界面設(shè)計(jì)(10)
主要屬性、事件代碼:
text1.valid(15分)
n=val(thisform.text1.value)
if n<0 or n>12
wait windows'月份錯(cuò)誤。。'
return .f.
endif
do case
case n>=3 and n<=5
thisform.label2.caption='春'
case n>=6 and n<=8
thisform.label2.caption='夏'
case n>=9 and n<=11
thisform.label2.caption='秋'
case n=12 or n=1 or n=2
thisform.label2.caption='冬'
endcase
form.dblclick(5分)
thisform.release