【正文】
ScoreInfo where StudentNo=x and CouNo =39。)if a=85and b=85and c=85and d=85and e=85and f=85and g=85print39。 else if a=80 and b=80 and c=80 and d=80 and e=80 and f=80 andg=80 print39。 else if a=70 and b=70 and c=70 and d=70 and e=70 and f=70 and g=70 and (a+b+c+d+e+f+g)/7=75 print39。 else print39。 在創(chuàng)建好存儲(chǔ)過(guò)程后,判斷某同學(xué)是否獲獎(jiǎng)學(xué)金 exec jxjpb 39。 三、改進(jìn)在獎(jiǎng)學(xué)金評(píng)定過(guò)程中,考慮綜合測(cè)評(píng)的因素。(一)綜合測(cè)評(píng)能獲得獎(jiǎng)學(xué)金的同學(xué):創(chuàng)建視圖:綜合測(cè)評(píng)能獲得一等獎(jiǎng)學(xué)金的同學(xué)create view BalanceMeasuresFirst as select top 17 percent * from BalanceMeasures 創(chuàng)建視圖:綜合測(cè)評(píng)能獲得二等獎(jiǎng)學(xué)金的同學(xué)create view BalanceMeasuresSecondasselect top 30 percent * from BalanceMeasures創(chuàng)建視圖:綜合測(cè)評(píng)能獲得三等獎(jiǎng)學(xué)金的同學(xué)create view BalanceMeasuresThird as select top 60 percent * from BalanceMeasures (2) 憑各項(xiàng)成績(jī)能獲得獎(jiǎng)學(xué)金的同學(xué): 創(chuàng)建視圖:各項(xiàng)成績(jī)獲一等獎(jiǎng)學(xué)金create view as select as39。, StudentName as 39。 from ScoreInfo,StudentInfo where =group by ,StudentNamehaving min(Score)=85 go 創(chuàng)建視圖:各項(xiàng)成績(jī)獲二等獎(jiǎng)學(xué)金(不包括各項(xiàng)成績(jī)獲得一等的同學(xué))create viewas select as39。, StudentName as 39。 from ScoreInfo,StudentInfo where = group by ,StudentName having min(Score)=80 and min(Score)85 theSecondClassScholarship go 創(chuàng)建視圖:各項(xiàng)成績(jī)獲三等獎(jiǎng)學(xué)金(不包括各項(xiàng)成績(jī)獲得一等和二等的同學(xué))create view as select as39。, StudentName as 39。 from ScoreInfo,StudentInfo where = group by ,StudentNamehaving min(Score)=70 and min(Score)80 and avg(Score)=75 go (3) 評(píng)定最終獲得獎(jiǎng)學(xué)金的同學(xué):最終獲得一等獎(jiǎng)學(xué)金的同學(xué) Create view ScholarshipFirst as select distinct ,from BalanceMeasuresFirst,theFirstClassScholarshipwhere =theFirstClassScholarship .學(xué)號(hào)go 最終獲得二等獎(jiǎng)學(xué)金的同學(xué)Create view ScholarshipSecond as select distinct ,from BalanceMeasuresSecond,theSecondClassScholarshipwhere BalanceMeasuresSecond .學(xué)號(hào)=theSecondClassScholarship .學(xué)號(hào)And not in(select 號(hào)from theFirstClassScholarship) go 最終獲得三等獎(jiǎng)學(xué)金的同學(xué) create view ScholarshipThird as select distinct ,from BalanceMeasuresThird,theThirdClassScholarshipwhere BalanceMeasuresThird .學(xué)號(hào)=theThirdClassScholarship .學(xué)號(hào) and in (select theFirstClassScholarship. 學(xué)號(hào) from theFirstClassScholarship) and BalanceMeasuresThird學(xué)號(hào)not in (select theSecondClassScholarship. 學(xué)號(hào) from theSecondClassScholarship) and not exists(select * from abc where 學(xué)號(hào)=) and in (select 學(xué)號(hào)from abc) go (4) 驗(yàn)證獎(jiǎng)學(xué)金獲得情況:create procedure ScholarshipCheck a char(10) as if exists(select * from theFirstClassScholarship where 學(xué)號(hào)=a ) print39。 else if exists (select * from theSecondClassScholarship where 學(xué)號(hào)=a ) print39。 else if exists(select * from theThirdClassScholarship where 學(xué)號(hào)=a ) print39。 else print39。 (5) SQL 查詢語(yǔ)句導(dǎo)出數(shù)據(jù)庫(kù)新建查詢,輸入語(yǔ)句: EXEC master..xp_cmdshell 39。 庫(kù)名 表名 存儲(chǔ)路徑 登錄 用戶名 密碼 EXEC sp_configure 39。, 1。EXEC sp_configure 39。, 1。出現(xiàn)錯(cuò)誤: 消息15281,級(jí)別16,狀態(tài)1,過(guò)程xp_cmdshell,第1 行 SQL Server阻止了對(duì)組件阻止了對(duì)組件39。的過(guò)程的過(guò)程39。 的訪問(wèn),因 的訪問(wèn),為此組件已作為此服務(wù)器安全配置的一部分而被關(guān)閉。有關(guān)啟用39。 的詳細(xì)信息,請(qǐng)參閱 SQL Server 聯(lián)機(jī)叢書(shū)中的外圍應(yīng)用配置器 。配置選項(xiàng)39。 已從0 更改為 1。配置選項(xiàng)39。已從更改為。請(qǐng)運(yùn)行RECONFIGURE 語(yǔ)句進(jìn)行安裝。show advanced options39。RECONFIGURE。xp_cmdshell39。RECONFIGUR