Database Reference
In-Depth Information
Figure 9.26
Choose data connection.
18. On the Conigure the Select Statement page, select the option Specify a custom SQL
statement or stored procedure and then click Next .
19. On the Deine Custom Statements and Stored Procedures page, click the Query Builder
button. In the Query Builder dialog, add the tables CLASS , COURSE , SEMESTER ,
DAYS , and TIMEBLOCK . hen, select the columns, ClassID , CourseName ,
TimeBlock , Week Day , Semester , and Credit as shown in Figure 9.19. Click Execute
Query to make sure that the query is working properly. hen, click OK .
20. In the SQL statement pane, make sure that the SELECT tab is selected and add the
selection condition
WHERE CLASS.ClassID = @ClassID
to the SQL statement generated by Query Builder as shown in Figure 9.27.
21. Click the UPDATE tab and enter the following code as shown in Figure 9.28:
UPDATE CLASS
SET CourseID = (SELECT CourseID FROM COURSE
WHERE CourseName = @CourseName),
TimeID = (SELECT TimeID FROM TIMEBLOCK
WHERE TimeBlock = @TimeBlock),
SemesterID = (SELECT SemesterID FROM SEMESTER
WHERE Semester = @Semester),
DayID = (SELECT DayID FROM [DAYS]
WHERE [WeekDay] = @WeekDay),
Credit = @Credit
WHERE ClassID = @original_ClassID
Search WWH ::




Custom Search