Results 1 to 6 of 6
  1. #1
    Join Date
    Sep 2009
    Posts
    3

    Unanswered: CROSS JOIN in Access 2007

    Hi All;
    I am an infant when it comes to DB. I have a table named INVOICE and another table named LINE. The database is part of a textbook and setup properly. (works with all exercises). I am writing a query in sql as follows,
    SELECT * FROM INVOICE CROSS JOIN LINE;

    getting an error saying that "syntax error in FROM clause." The error comes up for all join statements. Please help.

  2. #2
    Join Date
    Apr 2002
    Location
    Toronto, Canada
    Posts
    20,002
    Code:
    SELECT * FROM INVOICE, LINE
    simple, eh?

    rudy.ca | @rudydotca
    Buy my SitePoint book: Simply SQL

  3. #3
    Join Date
    Sep 2009
    Posts
    3
    thanks for the reply. my problem is that I have to use these various join statements in my query code. Not allowed to use alternative syntax. Am I not typing it correctly? I tried a couple of examples from the book and got same syntax error.

  4. #4
    Join Date
    Apr 2002
    Location
    Toronto, Canada
    Posts
    20,002
    "have to" ???

    what is it, some kind of homework assignment?

    if Access does not support CROSS JOIN syntax, then the solution i gave you works correctly

    one of the key steps in learning to work with databases is to recognize when your teacher (or a book) is yanking your chain
    rudy.ca | @rudydotca
    Buy my SitePoint book: Simply SQL

  5. #5
    Join Date
    Sep 2009
    Posts
    3
    Ya, its part of my homework. I e-mailed the teach and she says it should work. All statements with "JOIN" in them are giving me a syntax error. I am able to work around it right now and get desired results but will run into problems later on when I would have to use JOIN statements.

  6. #6
    Join Date
    Apr 2002
    Location
    Toronto, Canada
    Posts
    20,002
    Quote Originally Posted by goliwala
    All statements with "JOIN" in them are giving me a syntax error.
    that's because you are not coding the FROM clause correctly

    simple, eh?
    rudy.ca | @rudydotca
    Buy my SitePoint book: Simply SQL

Posting Permissions

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