監(jiān)理公司管理系統(tǒng) | 工程企業(yè)管理系統(tǒng) | OA系統(tǒng) | ERP系統(tǒng) | 造價咨詢管理系統(tǒng) | 工程設(shè)計管理系統(tǒng) | 甲方項目管理系統(tǒng) | 簽約案例 | 客戶案例 | 在線試用
X 關(guān)閉

發(fā)布華軍軟件站SQL補丁包(2-13)

申請免費試用、咨詢電話:400-8352-114

--錯誤提示:糾正了時間段容納字符串太短的錯誤,及班級列表不能顯示備注而出錯,糾正學(xué)生選課后,班級人數(shù)不變的錯誤
--針對版本:School V3.0 2006-02-07日版
--安裝方法:打開查詢分析器,選擇School3數(shù)據(jù)庫,執(zhí)行即可

ALTER TABLE [Class] ALTER column [TimeSegmentName] varchar(500) null
GO

ALTER VIEW dbo.ClassView
AS
SELECT dbo.Class.ClassID, dbo.Class.ClassName, dbo.Class.CourseID,
      dbo.Class.TeacherID, dbo.Class.CycName, dbo.Class.TimeSegmentName,
      dbo.Class.ClassRoomID, dbo.Class.CourseHours, dbo.Class.StartDate,
      dbo.Class.EndDate, dbo.Class.SystemDate, dbo.Class.SchoolID,
      dbo.Class.ClassCount, dbo.Class.PlanCount, dbo.Class.Monday, dbo.Class.Tuesday,
      dbo.Class.Wednesday, dbo.Class.Thursday, dbo.Class.Friday, dbo.Class.Saturday,
      dbo.Class.Sunday, dbo.Class.CycHoursInfo, dbo.Class.ClassFee,
      dbo.Class.ClassBookFee, dbo.School.SchoolName, dbo.School.SchoolNO,
      dbo.ClassRoom.ClassRoomName, dbo.ClassRoom.Seating, dbo.School.SchoolLock,
      dbo.ClassRoom.ClassRoomLock, dbo.Users.UserName,
      dbo.CourseView.CourseName, dbo.CourseView.CourseNO,
      dbo.CourseView.CourseLock, dbo.CourseView.SerialCourseID,
      dbo.CourseView.SerialCourseName, dbo.CourseView.SerialCourseLock,
      dbo.CourseView.SubjectID, dbo.CourseView.SubjectName,
      dbo.CourseView.SubjectLock, dbo.Class.CCTimeIng, dbo.Class.Remark
FROM dbo.Class INNER JOIN
      dbo.School ON dbo.Class.SchoolID = dbo.School.SchoolID INNER JOIN
      dbo.CourseView ON dbo.Class.CourseID = dbo.CourseView.CourseID INNER JOIN
      dbo.Users ON dbo.Class.TeacherID = dbo.Users.UserID INNER JOIN
      dbo.ClassRoom ON dbo.Class.ClassRoomID = dbo.ClassRoom.ClassRoomID

GO

ALTER TRIGGER TRMyClass_Insert
ON dbo.MyClass
AFTER Insert AS
Declare @ClassID varchar(50),@StudentID varchar(50),@ClassCount int,@NewClassName varchar(50)

Select DISTINCT @ClassID=ClassID,@StudentID=StudentID from inserted

Select @ClassCount = ClassCount from Student where StudentID = @StudentID
Select @NewClassName = ClassName from [Class] where ClassID = @ClassID

Update Student set ClassCount= @ClassCount + 1,NewClassName=@NewClassName where StudentID = @StudentID
--更新班級學(xué)生人數(shù)
exec ClassFactCont @ClassID
GO
-------------------------------------------2006-2-13日,泛普工作室

發(fā)布:2007-03-30 09:51    編輯:泛普軟件 · xiaona    [打印此頁]    [關(guān)閉]
相關(guān)文章: