Results 1 to 4 of 4
  1. #1
    Join Date
    Feb 2004
    Posts
    78

    Unanswered: sql table join problem

    hi i am very new to sql and have i problem i would like to solve with your help i have 2 tables, module (modid, courseid, name, tutorid, assessments) and modresults (modid, studentid, assessmentno, url, grade, tutorcomment). what i want to do is write a query so that all the module results are displayed for a particular tutorid.
    what i have so far is.

    select *
    from e modresults, d module
    where e.modid = d.modid and staffid ="1" //for the case that we want to see staffid 1's results

    where am i going wrong.
    please help

  2. #2
    Join Date
    Feb 2004
    Location
    In front of the computer
    Posts
    15,579
    Provided Answers: 54
    Since this is an assignment, I'd suggest that you check the part about
    Code:
    staffid="1"
    just to see if that is what you really meant.

    -PatP

  3. #3
    Join Date
    Feb 2004
    Posts
    78
    this is'nt an assignment this is just a exercise from the "introduction to oracle9i:sql" book which shows a different set of results. please can some one help

  4. #4
    Join Date
    Mar 2004
    Posts
    480
    select *
    from e modresults, d module
    where e.modid = d.modid and staffid ="1"
    1) do not use select *, actually name the columns you want to display
    2) you don't have tables e and d, you have tables modresults and module
    so you need to say modresults e, module d
    3) don't use quotes around the 1 in staffid.

    See where that gets you.

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •