-
Notifications
You must be signed in to change notification settings - Fork 0
/
DDLTimetabler.txt
203 lines (149 loc) · 10.9 KB
/
DDLTimetabler.txt
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
SQL> create table timetable(day varchar2(12),class varchar2(20),section varchar2(3),starttime varchar2(5),endtime varchar2(5),worktobedone varchar2(100),workleft varchar2(100),primary key(class,section,starttime,endtime));
Table created.
SQL> insert into timetable values('&day','&class','§ion','&starttime','&endtime','&worktobedone','&workleft');
Enter value for day: Monday
Enter value for class: 8
Enter value for section: B
Enter value for starttime: 8:30
Enter value for endtime: 10:20
Enter value for worktobedone: Revision
Enter value for workleft:
old 1: insert into timetable values('&day','&class','§ion','&starttime','&endtime','&worktobedone','&workleft')
new 1: insert into timetable values('Monday','8','B','8:30','10:20','Revision','')
1 row created.
SQL> /
Enter value for day: Tuesday
Enter value for class: 3
Enter value for section: D
Enter value for starttime: 12:23
Enter value for endtime: 13:32
Enter value for worktobedone:
Enter value for workleft:
old 1: insert into timetable values('&day','&class','§ion','&starttime','&endtime','&worktobedone','&workleft')
new 1: insert into timetable values('Tuesday','3','D','12:23','13:32','','')
1 row created.
SQL> /
Enter value for day: Monday
Enter value for class: 6
Enter value for section: F
Enter value for starttime: 15:30
Enter value for endtime: 16:40
Enter value for worktobedone:
Enter value for workleft:
old 1: insert into timetable values('&day','&class','§ion','&starttime','&endtime','&worktobedone','&workleft')
new 1: insert into timetable values('Monday','6','F','15:30','16:40','','')
1 row created.
SQL> select * from timetable;
DAY CLASS SEC START ENDTI
------------ -------------------- --- ----- -----
WORKTOBEDONE
--------------------------------------------------------------------------------
WORKLEFT
--------------------------------------------------------------------------------
Monday 8 B 8:30 10:20
Revision
Tuesday 3 D 12:23 13:32
DAY CLASS SEC START ENDTI
------------ -------------------- --- ----- -----
WORKTOBEDONE
--------------------------------------------------------------------------------
WORKLEFT
--------------------------------------------------------------------------------
Monday 6 F 15:30 16:40
SQL> update timetable set workleft='&workleft' where day='&day'and class='&class' and section='§ion'and starttime='&starttime'and endtime='&endtime';
Enter value for workleft: Lesson-2
Enter value for day: Monday
Enter value for class: 8
Enter value for section: B
Enter value for starttime: 8:30
Enter value for endtime: 10:20
old 1: update timetable set workleft='&workleft' where day='&day'and class='&class' and section='§ion'and starttime='&starttime'and endtime='&endtime'
new 1: update timetable set workleft='Lesson-2' where day='Monday'and class='8' and section='B'and starttime='8:30'and endtime='10:20'
1 row updated.
SQL> select * from timetable;
DAY CLASS SEC START ENDTI
------------ -------------------- --- ----- -----
WORKTOBEDONE
--------------------------------------------------------------------------------
WORKLEFT
--------------------------------------------------------------------------------
Monday 8 B 8:30 10:20
Revision
Lesson-2
Tuesday 3 D 12:23 13:32
DAY CLASS SEC START ENDTI
------------ -------------------- --- ----- -----
WORKTOBEDONE
--------------------------------------------------------------------------------
WORKLEFT
--------------------------------------------------------------------------------
Monday 6 F 15:30 16:40
SQL> update timetable set worktobedone='&worktobedone' where day='&day'and class='&class' and section='§ion'and starttime='&starttime'and endtime='&endtime';
Enter value for worktobedone: Complete till lesson-3
Enter value for day: monday
Enter value for class: 8
Enter value for section: B
Enter value for starttime: 8:30
Enter value for endtime: 10:20
old 1: update timetable set worktobedone='&worktobedone' where day='&day'and class='&class' and section='§ion'and starttime='&starttime'and endtime='&endtime'
new 1: update timetable set worktobedone='Complete till lesson-3' where day='monday'and class='8' and section='B'and starttime='8:30'and endtime='10:20'
0 rows updated.
SQL> /
Enter value for worktobedone: Complete till lesson-3
Enter value for day: Monday
Enter value for class: 8
Enter value for section: B
Enter value for starttime: 8:30
Enter value for endtime: 10:20
old 1: update timetable set worktobedone='&worktobedone' where day='&day'and class='&class' and section='§ion'and starttime='&starttime'and endtime='&endtime'
new 1: update timetable set worktobedone='Complete till lesson-3' where day='Monday'and class='8' and section='B'and starttime='8:30'and endtime='10:20'
1 row updated.
SQL> delete from timetable where class='&class' and section='§ion'and starttime='&starttime' and endtime='&endtime';
Enter value for class: 8
Enter value for section: B
Enter value for starttime: 8:30
Enter value for endtime: 10:20
old 1: delete from timetable where class='&class' and section='§ion'and starttime='&starttime' and endtime='&endtime'
new 1: delete from timetable where class='8' and section='B'and starttime='8:30' and endtime='10:20'
1 row deleted.
SQL> select * from timetable;
DAY CLASS SEC START ENDTI
------------ -------------------- --- ----- -----
WORKTOBEDONE
--------------------------------------------------------------------------------
WORKLEFT
--------------------------------------------------------------------------------
Tuesday 3 D 12:23 13:32
Monday 6 F 15:30 16:40
DAY CLASS SEC START ENDTI
------------ -------------------- --- ----- -----
WORKTOBEDONE
--------------------------------------------------------------------------------
WORKLEFT
--------------------------------------------------------------------------------
SQL> commit;
Commit complete.
SQL> update timetable set worktobedone='&worktobedone' where day='&day'and class='&class' and section='§ion'and starttime='&starttime'and endtime='&endtime';
Enter value for worktobedone: Complete all lessons
Enter value for day: monday
Enter value for class: 6
Enter value for section: F
Enter value for starttime: 15:30
Enter value for endtime: 16:40
old 1: update timetable set worktobedone='&worktobedone' where day='&day'and class='&class' and section='§ion'and starttime='&starttime'and endtime='&endtime'
new 1: update timetable set worktobedone='Complete all lessons' where day='monday'and class='6' and section='F'and starttime='15:30'and endtime='16:40'
0 rows updated.
SQL> /
Enter value for worktobedone: Complete all lessons
Enter value for day: Monday
Enter value for class: 6
Enter value for section: F
Enter value for starttime: 15:30
Enter value for endtime: 16:40
old 1: update timetable set worktobedone='&worktobedone' where day='&day'and class='&class' and section='§ion'and starttime='&starttime'and endtime='&endtime'
new 1: update timetable set worktobedone='Complete all lessons' where day='Monday'and class='6' and section='F'and starttime='15:30'and endtime='16:40'
1 row updated.
SQL> commit
2 ;
Commit complete.
SQL> spool off