Please start any new threads on our new
site at https://forums.sqlteam.com. We've got lots of great SQL Server
experts to answer whatever question you can come up with.
Author |
Topic |
sayer
Starting Member
35 Posts |
Posted - 2013-04-20 : 08:31:21
|
[code]select lesson_number as Lecture ,date,student.ID_student,dbo.FUN_names(student.frist_Name, student.Second_Name, student.Last_Name) AS name ,stae as state[/code]from[code]lecture ,student_lectuer ,Teacher_Course ,student ,section , course ,Supervisor ,TeachCourse_Super ,teacher[/code]where[code]lecture.lesson_number=student_lectuer.FK_lesson_number andlecture.ID_Course_Teacher=Teacher_Course.idandstudent.ID_student=student_lectuer.fk_student_idandTeacher_Course.FK_Teacher_ID=teacher.Teacher_IDandTeacher_Course.FK_Course_ID=course.Coures_IDandTeacher_Course.FK_Section_ID=section.Section_IDandTeachCourse_Super.teacher_coures_ID=Teacher_Course.idandTeachCourse_Super.super_id=Supervisor.Super_IDandcourse.Coures_ID=102andsection.Section_ID=3[/code]after execute select Num_Lecture|date|id|name|state_absent--------------------------------1>>>>>>>2013-08-19>>>295>>>fahed>>>Yes 1>>>>>>>2013-08-19>>>291>>>sayer>>>no 3>>>>>>>2013-09-17>>>222>>>saleh>>>yes 4>>>>>>>2013-09-28>>>200>>>tlal>>>no 5>>>>>>2013-09-01>>>200>>>tlal>>>no 5>>>>>>>2013-09-01>>>222>>>saleh>>>no 6>>>>>>>2013-10-09>>>200>>>tlal>>>no 6>>>>>>>2013-10-09>>>222>>>saleh>>>yes ----------------------------------i want number lecture in column and no repeat note:i have dynamic number of lecture then id and name in row then state print in cell such as >>>>>>>>>lecture>>1>>2>>3 id>>>name222>>>saleh>>>>>>yes>>no>>yesplease help me http://aman-services.netfor office???? ???? ??????? |
|
|
|
|
|
|