+ Reply to Thread
Results 1 to 3 of 3

Quatation mark or single mark in sql query

  1. #1
    Forum Contributor
    Join Date
    08-19-2010
    Location
    N/A
    MS-Off Ver
    Excel 2010
    Posts
    151

    Quatation mark or single mark in sql query

    Hello,

    I am trying to run sql query in VBA.
    Some of the condition values contain single quate sign or
    quatation mark, so I get an error (Missing operator) when I try to run the query.

    Example:
    ... OR [Name] = 'AB'C' ...
    ... OR [Name] = "AB"C" ...

    My data contain both single quate and quatation marks.

    How should I declare sql query ?

    Thank you
    Last edited by Snoopy2003; 11-07-2010 at 06:03 PM.

  2. #2
    Forum Guru DonkeyOte's Avatar
    Join Date
    10-22-2008
    Location
    Essex, UK
    MS-Off Ver
    O365
    Posts
    21,528

    Re: Quatation mark or single mark in sql query

    Double up the apostrophe ...

    Please Login or Register  to view this content.

  3. #3
    Forum Contributor
    Join Date
    08-19-2010
    Location
    N/A
    MS-Off Ver
    Excel 2010
    Posts
    151

    Re: Quatation mark or single mark in sql query

    Thank you for your help and for solving my problem.

    Thank you

+ Reply to Thread

Thread Information

Users Browsing this Thread

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

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