• deepzzzz (7/17/2012)


    Just suppose I have table columns like this

    1 Application

    2 Application's

    3 Foreign Application

    4 Application's effect

    So, if I am running query SELECT * FROM table_name WHERE CONTAINS(*, ' "Application''s" ')

    I am putting " " for exact match. Double ' ' (Single quote) after application is used for representing ' inside " ".

    So result of the above query should be,

    2 Application's

    4 Application's effect

    Please let me know if you need any other explanations

    So the above corrected subbareddy's query should work.

    Putting again with your example.

    DECLARE @T1 TABLE(ID INT,NAME VARCHAR(30))

    INSERT INTO @T1(ID,NAME)

    SELECT 1,'Application'

    UNION

    SELECT 2,'Application''s'

    UNION

    SELECT 3,'Foreign Application'

    UNION

    SELECT 4,'Application''s effect'

    SELECT * FROM @T1

    WHERE NAME LIKE 'Application''s%'

    --rhythmk
    ------------------------------------------------------------------
    To post your question use below link

    https://www.sqlservercentral.com/articles/forum-etiquette-how-to-post-datacode-on-a-forum-to-get-the-best-help
    🙂