Need help with query

Forum Forum Bar Need help with query

Questo argomento contiene 0 risposte, ha 1 partecipante, ed è stato aggiornato da  HarryJenkins 10 mesi, 1 settimana fa.

  • Autore
  • #570



    I’m having an issue trying to do something. Attached is an OpenOffice database that contains three tables. My objective is to pull only seniors from the list of students and then have it sort first by last name and then by first name (in only one query). This is what I have as my sql query:
    SELECT “Students”.”First Name” AS “First Name”, “Students”.”Last Name” AS “Last Name”, “Students”.”Address” AS “Address”, “Students”.”City” AS “City”, “Students”.”State” AS “State”, “Students”.”Zip Code” AS “Zip Code”, “Students”.”Phone Number with area code” AS “Phone Number with area code”, “GPA”.”Class” AS “Class” FROM “Students” “Students”, “GPA” “GPA” WHERE ( “Class” = ‘Senior’ ) ORDER BY “Students”.”Last Name”, “Students”.”First Name”
    However, when I execute this, I don’t get what I want, it lists everyone (even duplicates them) and labels them as seniors. I only have two seniors in my database (Lily and Ralph). Any ideas of what’s wrong?

    Any help will be apprecited.

    I didn’t find the right solution from the Internet.

    animated medical device video

    Thank you.

Devi essere loggato per rispondere a questa discussione.