Results 1 to 6 of 6
  1. #1
    Join Date
    Nov 2008
    Posts
    16

    Unanswered: how to add single quote in select query

    my query is:-

    Select * from pofolder where FolderName = 'Wilfer's List'.

    How to add single quote in the MS-SQl query.
    Please help me.

  2. #2
    Join Date
    Jan 2003
    Location
    Massachusetts
    Posts
    5,800
    Provided Answers: 11
    Code:
    Select * from pofolder where FolderName = 'Wilfer''s List'

  3. #3
    Join Date
    Nov 2008
    Posts
    16
    It works..Thxs a lot !

  4. #4
    Join Date
    Dec 2007
    Location
    London, UK
    Posts
    741
    '' works in literal strings. More typically in production code the string is a variable and therefore you don't need to do anything special with quotes.

  5. #5
    Join Date
    Jan 2007
    Location
    UK
    Posts
    11,434
    Provided Answers: 10
    And by variable you mean parameter.

    There's a subtle difference
    George
    Home | Blog

  6. #6
    Join Date
    Nov 2008
    Posts
    4

Posting Permissions

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