Guidance needed to produce report
As the title of this topic illustrates, i'm having trouble dumping relevant data from columns of different tables. Using isql*plus, I have three tables appropriatly related. A 'course' table, 'student' and 'next_of_kin' tables. I have many students enrolled on various courses but only a hanfull of courses offer the module option 'Database Systems'. I have no 'module' table but i know the three course names which provide the module option. I intend on producing a report hich lists all students enrolled on the courses which provid the module option 'Database Systems'. I have attempted the report but i keep getting a 'cartesian product' displaying all next_of_kin names instead of the appropriate. Also i am struggling to come up with the right WHERE statement to depict only the three courses which provide the module option 'Database Systems' as defined by 'courseNo' in both 'course' and 'student' tables.
Here is the most recent attempt: :confused:
--set echo off
--set pagesize 24
--set feedback off
--set linesize 78
col A format 99999999 heading 'Student No'
col B format A15 heading 'Student Name'
col C format A15 heading 'Course Name'
col D format 99999999 'Course No'
col E format A10 heading 'Next-of-Kin'
break on A skip 1 on B
TTitle 'Business Studies 1 Option BT300'
BTitle 'Prepared By : Richard Stroud / 20527796'
Select student.StudentNo "Student No",
student.fName || ' ' || student.lName "Student Name",
course.title "Course Name",
course.courseNo "Course No",
next_of_kin.fName || ' ' || next_of_kin.lName "Next-of-Kin"
From student, course, next_of_kin
where course.courseNo = '12885545'
order by studentNo
--set feedback on
--set pagesize 24
Any help towards this toipic will be GREATLY appreciated :)