|
|
|||||||||
|
|||||||||
|
|||||||||
| |
||
| |||||||||
![]() |
|
|
«
Previous Thread
|
Next Thread
»
|
Thread Tools | Search this Thread | Rate Thread | Display Modes |
|
|
|
Ajax Application Generator Generate database and reporting .NET Web apps in minutes. Quickly create visually stunning, feature-rich apps that are easy to customize and ready to deploy. Download Now!
|
|
#1
|
|||
|
|||
|
Hey im completely new 2 this so it will probably seem easy to any1 reading this but heres the query i have to do
thanx Consider the database schema on the relations (where the key attributes are followed by a *) COURSES(Number*, Faculty, CourseName) STUDENT(Number*, Surname, FirstName, Faculty) EXAMS(Student*, Course*, Grade, Date) Relation EXAMS stores the registration number(attribute Student) of students that passed the exam for a given course (attribute Course is the number of course, not the name of the course), the grade and the date of the exam. Write the query that finds the surnames of students and the exams they passed (number of course and corresponding grade) in SQL, Relational Algebra, and Relational Calculus. Any help will be greatly appreciated Thanks |
|
#2
|
||||
|
||||
|
well you can do
** UNTESTED <% '/// DB Connection Here set RS = Server.createObject("ADODB.RecordSet") SQL ="Select STUDENT.Surname, STUDENT.FirsName, STUDENT.Faculty" & _ "COURSES.CourseName, COURSES.Number, EXAMS.Grade, EXAMS.Date" & _ " From EXAMS Inner Join STUDENT on EXAMS.Student = STUDENT.NUMBER" & _ "inner join COURSES on EXAMS.Course = COURSES.Number" RS.Open SQL, Conn If RS.EOF Then Response.write("Database is Empty") Else Do Until RS.EOF Response.write( RS("Surname") RS("CourseName") RS("Number) RS("Grade")& " <BR>") RS.MoveNext Loop %> |
![]() |
| Viewing: ASP Free Forums > Other > Programming Help > Confused by Queries |
| Thread Tools | Search this Thread |
| Display Modes | Rate This Thread |
|
|
|
|
|
|
|