08:45 TDLite 3 | |
3адача 6 В текстовое поле ввести номер курса и название группы. При нажатии на кнопку выводятся все студенты, обучающиеся в данном курсе и группе.
Select surname, name from fio where st_id in (select st_id from pers_list where year=3 and gr='КФА')
ADODataSet1.Active:=false; ADODataSet1.CommandText:='Select surname, name from fio '+ 'where st_id in '+ '(select st_id from pers_list '+ 'where year='+Edit1.Text+' and gr='+''''+Edit2.Text+''''+')'; ADODataSet1.Active:=true;
3адача 7 В текстовое поле вводится отделение. Вывести всех студентов, обучающихся на этом отделении
Select surname, name from fio where st_id in (select st_id from year_his where otd='Дн')
ADODataSet1.Active:=false; ADODataSet1.CommandText:='Select surname, name from fio '+ 'where st_id in '+ '(select st_id from year_his '+ 'where otd='+''''+Edit1.Text+''''+')'; ADODataSet1.Active:=true;
3адача 8 Вводится номер семестра в текстовое поле. Вывести названия предметов, которые сдавались в этом семестре
select subj_name from subjects where subj_code in (select subj_code from examen where sem_key in (select sem_key from sem_his where sem=1))
ADODataSet1.Active:=false; ADODataSet1.CommandText:='select subj_name from subjects '+ 'where subj_code in '+ '(select subj_code from examen '+ 'where sem_key in '+ '(select sem_key from sem_his '+ 'where sem='+Edit1.Text+'))'; ADODataSet1.Active:=true;
3адача 9 В текстовое поле вводится фамилия студента. Вывести его все оценки. select res from examen where e_type=2 and sem_key in (select sem_key from sem_his where his_key in (select his_key from year_his where st_id in (select st_id from fio where surname='Афонина')))
ADODataSet1.Active:=false; ADODataSet1.CommandText:='select res from examen '+ 'where e_type=2 and sem_key in '+ '(select sem_key from sem_his '+ 'where his_key in '+ '(select his_key from year_his '+ 'where st_id in '+ '(select st_id from fio '+ 'where surname='+''''+Edit1.Text+''''+')))'; ADODataSet1.Active:=true; | |
|
Всего комментариев: 0 | |