Inner Join Help

Results 1 to 3 of 3

Thread: Inner Join Help

  1. #1
    asp Guest

    Default Inner Join Help

    we are trying to join two tables (students and schools)... in the schools table there are all the school names with different id&#039;s and in the students table there are fields kinder, primary, secondary, postsec and university. Each of them correspond to an ID in the Schools table. We need to know how can we join the tables to get the school name for the kinder, primary, secondary, postsec and university from the schools table.<BR><BR>We tried this statement : SELECT,, FROM students INNER JOIN schools ON = WHERE = 73 <BR>but we are getting this error : <BR>Error Type:<BR>Microsoft OLE DB Provider for ODBC Drivers (0x80040E10)<BR>[Microsoft][ODBC Microsoft Access Driver] Too few parameters. Expected 1.<BR><BR>Can anyone help us accomplish this task.<BR>Thank you very much :)

  2. #2
    Join Date
    Dec 1969

    Default RE: Inner Join Help

    That error message normally means that you have mis-typed the name of one of the fields.<BR><BR>A couple of suggestions:<BR><BR>1) Try the query in the Access Query Grid. If it works in there, it should work in ASP (in most cases).<BR><BR>2) Do a response..Write of the Sql statement being used in your page. This will show you what is being generated and is the best way to debug these kind of problems.

  3. #3
    Ali Guest

    Default RE: Inner Join Help

    You are not specifying the schools table in the FROM part of the query. Also, make sure that the student id is numeric, otherwise you need single quotes around it.

Posting Permissions

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