Results 1 to 2 of 2

Thread: insert statement

  1. #1

    Thread Starter
    New Member
    Join Date
    Mar 2000
    Posts
    7
    Help! The following statement causes compile error: expected end of statement

    INSERT INTO table1 SELECT * FROM table2 WHERE field = '" & variable & "'

  2. #2
    Frenzied Member HarryW's Avatar
    Join Date
    Jan 2000
    Location
    Heiho no michi
    Posts
    1,827
    I'm not quite sure what that says cos it's real small
    Which is it?:

    " ' & variable & ' "

    ' " & variable & " '

    ' ' ' & variable & ' ' '

    I've spaced the speech marks/apostrophes out so you can see the difference.

    I would have expected this:

    " ' " & variable & " ' "

    If you're setting up a string to use as an SQL statement.
    Harry.

    "From one thing, know ten thousand things."

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