Need help with an SQL query joining 3 tables

sql , cognos , joins Madison, United States
  • 10 years ago

    Hello,

    I have 3 tables that am trying to join to get some output:

    Student ST , Class CL , Enrollment EN tables. conditions:

    CL.Classnumber = '1234' Student who have have an EN.Enrollmentcode in that class = 'E' and EN.Official_grade = 'A'

    So what i need is a list of all student enrolled in this class and received an A?

    Any help?

  • 10 years ago

    Hi, There must be a relation between these three tables,for ex:- you should have class number in student table and student id must present in Enrollment table.. if u ve a relation like this u can easily get a result using by joining the relation among the table

Post a reply

Enter your message below

Sign in or Join us (it's free).

Contribute

Why not write for us? Or you could submit an event or a user group in your area. Alternatively just tell us what you think!

Our tools

We've got automatic conversion tools to convert C# to VB.NET, VB.NET to C#. Also you can compress javascript and compress css and generate sql connection strings.

“Always code as if the guy who ends up maintaining your code will be a violent psychopath who knows where you live.” - Rick Osborne