+ Reply to Thread
Results 1 to 7 of 7

Insert Into syntax error

  1. #1
    Registered User
    Join Date
    09-06-2012
    Location
    Montes Claros, MG - Brazil
    MS-Off Ver
    Excel 2003
    Posts
    13

    Talking Insert Into syntax error

    Good night, Guys!

    I'm trying unsuccessfully to make a "SQL Insert Into" works. I got a message saying "insert into syntax error".

    That's the statement:

    Please Login or Register  to view this content.
    What supposed to be wrong?

    Thanks for your attention!
    Last edited by Leith Ross; 09-25-2012 at 05:22 PM. Reason: Added Code Tags

  2. #2
    Registered User
    Join Date
    09-06-2012
    Location
    Montes Claros, MG - Brazil
    MS-Off Ver
    Excel 2003
    Posts
    13

    Re: Insert Into syntax error

    full code, If helps:

    Please Login or Register  to view this content.

  3. #3
    Registered User
    Join Date
    09-11-2012
    Location
    Belfast
    MS-Off Ver
    Excel 2010
    Posts
    68

    Re: Insert Into syntax error

    I'm no expert, but I would try removing the double quotes and the ampersand at the beginning of the 4th line in your code? It might also make things a little clearer if you only use double quotes to enclose the whole string and single quotes inside.

  4. #4
    Registered User
    Join Date
    09-06-2012
    Location
    Montes Claros, MG - Brazil
    MS-Off Ver
    Excel 2003
    Posts
    13

    Re: Insert Into syntax error

    sbkeenan,

    I tried what you suggested but it didn't work.

    Anyway, thank you for your help.

    []'s

  5. #5
    Registered User
    Join Date
    09-11-2012
    Location
    Belfast
    MS-Off Ver
    Excel 2010
    Posts
    68

    Re: Insert Into syntax error

    I think you may also need to enclose the values in brackets.

  6. #6
    Forum Expert mike7952's Avatar
    Join Date
    12-17-2011
    Location
    Florida
    MS-Off Ver
    Excel 2007, Excel 2016
    Posts
    3,551

    Re: Insert Into syntax error

    Is tblcadprocesso the Sheet Name your tring to Insert into, if not try the sheet name.
    Thanks,
    Mike

    If you are satisfied with the solution(s) provided, please mark your thread as Solved.
    Select Thread Tools-> Mark thread as Solved.

  7. #7
    Registered User
    Join Date
    09-06-2012
    Location
    Montes Claros, MG - Brazil
    MS-Off Ver
    Excel 2003
    Posts
    13

    Re: Insert Into syntax error

    Guys,

    I got the solution. The problem was in how I was concatenating strings like sbkeenan indicated.

    The correct syntaxe is:

    Please Login or Register  to view this content.
    Thank you very much, guys!

    []'s

+ Reply to Thread

Thread Information

Users Browsing this Thread

There are currently 1 users browsing this thread. (0 members and 1 guests)

Tags for this Thread

Bookmarks

Posting Permissions

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

Search Engine Friendly URLs by vBSEO 3.6.0 RC 1