Results 1 to 8 of 8

Thread: syntax error in sql statement

  1. #1

    Thread Starter
    Addicted Member
    Join Date
    Nov 2001
    Location
    ottawa, canada
    Posts
    233

    syntax error in sql statement

    I keep on getting a 'syntax error in FROM clause' from the SQL querie below.


    strSQL = "Select CALIBRECORDS1.*, gauges.instrumentdescription FROM CALIBRECORDS1 join guages on CALIBRECORDS1.instrumennumber=guages.instrumennumber WHERE CALIBRECORDS1.instrumennumber=" & "'" & Form3.Text49.Text & "'"

    Anyone know where the problem is ?

    Any input would be appreciated.

  2. #2
    PowerPoster Pasvorto's Avatar
    Join Date
    Oct 2002
    Location
    Minnesota, USA
    Posts
    2,951
    How about "Select * from CALIBRECORDS1 ...

  3. #3

    Thread Starter
    Addicted Member
    Join Date
    Nov 2001
    Location
    ottawa, canada
    Posts
    233
    i'm linking 2 tables via the instrumennumber key field.

  4. #4
    PowerPoster
    Join Date
    Oct 2002
    Location
    British Columbia
    Posts
    9,758
    What database are you using?

  5. #5

    Thread Starter
    Addicted Member
    Join Date
    Nov 2001
    Location
    ottawa, canada
    Posts
    233
    hi, i am using the access dbase

  6. #6
    Frenzied Member swatty's Avatar
    Join Date
    Aug 2002
    Location
    somewhere on earth
    Posts
    1,478
    Try to build a new query and get the sql behind it.
    Code:
    If Question = Incomplete Then
       AnswerNextOne
    Else
       ReplyIfKnown
    End If
    cu Swatty

  7. #7
    PowerPoster
    Join Date
    Oct 2002
    Location
    British Columbia
    Posts
    9,758
    In Access, unlike Sql Server, the word Inner is required.

    CALIBRECORDS1 Inner Join guages

  8. #8
    Don't Panic! Ecniv's Avatar
    Join Date
    Nov 2000
    Location
    Amsterdam...
    Posts
    5,343
    Or Left (depending on what you want to return...)

    See top thread on sql info...


    Vince

    BOFH Now, BOFH Past, Information on duplicates

    Feeling like a fly on the inside of a closed window (Thunk!)
    If I post a lot, it is because I am bored at work! ;D Or stuck...
    * Anything I post can be only my opinion. Advice etc is up to you to persue...

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