Results 1 to 2 of 2

Thread: Using "'" In a Select Statement

  1. #1

    Thread Starter
    Lively Member
    Join Date
    Jun 2000
    Location
    Ontario, Canada.
    Posts
    85

    Unhappy

    I know this has been asked before and I forget how to do it.
    I need to know how to do a Select Statement with a ' in it.
    Example:

    "SELECT * FROM [CLIENTS] WHERE [NAME] = '" & name & "'"

    and here name would equal Joe O'Brien.

    Any help would be appreciated.

    Thanks In advance

  2. #2
    Fanatic Member
    Join Date
    Oct 1999
    Location
    England
    Posts
    982
    The answer is to place a second ' within the name string. Therefore O'Brien is changed to O''Brien.



    Things I do when I am bored: DotNetable

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