Results 1 to 4 of 4

Thread: Help with SQL Statement

  1. #1

    Thread Starter
    Member
    Join Date
    Dec 1999
    Location
    Cleveland,OH
    Posts
    42

    Post

    Help with SQL Statement

    No SQL genius here but I thought I was doing something simple. I am trying to INNER JOIN 3 tables. I got 2 tables to work, but the third dies and gives me (Syntax Error) Missing Operator. Here is what I have any help is greatly appreciated.

    This Works:
    SELECT Field1, Field2, Field3 FROM Table1 INNER JOIN Table2 ON Table1.ID = Table2.ID

    This Does Not:
    SELECT Field1, Field2, Field3 FROM Table1 INNER JOIN Table2 ON Table1.ID = Table2.ID INNER JOIN Table3 ON Table1.ID = Table3.ID

    Is this possible?

  2. #2
    PowerPoster Chris's Avatar
    Join Date
    Jan 1999
    Location
    K-PAX
    Posts
    3,238

    Post

    May be you can try out this:

    SELECT Field1, Field2, Field3 FROM ((Table1 INNER JOIN Table2 ON Table1.ID = Table2.ID) INNER JOIN Table3 ON Table1.ID = Table3.ID)


    _______________________
    Chris.C
    [email protected]

    [This message has been edited by Chris (edited 02-21-2000).]

  3. #3

    Thread Starter
    Member
    Join Date
    Dec 1999
    Location
    Cleveland,OH
    Posts
    42

    Post

    Thanks!

  4. #4
    New Member
    Join Date
    Mar 1999
    Location
    Bishop's Falls, NF, Canada
    Posts
    12

    Post

    If you are having problems with sql statements what i do is that i create them is access and view the query in the sql form and copy and paste in the visual basic code form. That will solve the syntax errors

Posting Permissions

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



Click Here to Expand Forum to Full Width