#1
  1. Charge into the Knight
    Devshed Newbie (0 - 499 posts)

    Join Date
    Jan 2002
    Location
    Orlando, FL
    Posts
    276
    Rep Power
    13

    Exclamation Querying Access gives me an Syntax error...please help


    Here is my sql statement and error message:

    PHP Code:
    SELECT FROM materials LEFT OUTER JOIN scndry_authors ON 
    materials
    .mat_rec_id=scndry_authors.mat_rec_id WHERE 
    materials.245_title_statement 
    ='STUDY GUIDE TO ACCOMPANY 
    BIOLOGY.'


    WarningInvoke() failedException occurredSourceMicrosoft 
    OLE DB Provider 
    for ODBC Drivers Description: [Microsoft][ODBC 
    Microsoft Access Driver
    Syntax error in query 
    expression 
    'materials.245_title_statement ='STUDY GUIDE TO 
    ACCOMPANY BIOLOGY
    .''in 
    C
    :\tent\wwwroot\test\archives_catalog\result.php on line 71 
    Can I have a field name start with a number?
    Every man is a fool for at least five minutes every day; wisdom consists of not exceeding the limit.-- Elbert Hubbard
  2. #2
  3. Registered User
    Devshed Newbie (0 - 499 posts)

    Join Date
    Dec 2002
    Posts
    9
    Rep Power
    0
    It would seem that you can't start a field name with a number. I just tried it and it gave me a syntax error just like you got. When I changed the number to a letter, there was no error.

IMN logo majestic logo threadwatch logo seochat tools logo