• a20213 (4/19/2013)


    Yes, the example is very simplified, what i want to do is to find results that match all words of the search.

    If i have the text "i have lunched with John Andrews and it was decided to postpone ... bla bla", so when searching in sentences/text, i want to return this sentence, because both words of the search criteria were found here.

    OK that is what I thought. You would probably have a lot better luck using full text search instead of trying to parse this do some sort of finagling with it.

    http://msdn.microsoft.com/en-us/library/ms142571.aspx

    Without doing a full text searching you would need to do a wildcard search on both sides of the stored value. This will be horrible for performance.

    _______________________________________________________________

    Need help? Help us help you.

    Read the article at http://www.sqlservercentral.com/articles/Best+Practices/61537/ for best practices on asking questions.

    Need to split a string? Try Jeff Modens splitter http://www.sqlservercentral.com/articles/Tally+Table/72993/.

    Cross Tabs and Pivots, Part 1 – Converting Rows to Columns - http://www.sqlservercentral.com/articles/T-SQL/63681/
    Cross Tabs and Pivots, Part 2 - Dynamic Cross Tabs - http://www.sqlservercentral.com/articles/Crosstab/65048/
    Understanding and Using APPLY (Part 1) - http://www.sqlservercentral.com/articles/APPLY/69953/
    Understanding and Using APPLY (Part 2) - http://www.sqlservercentral.com/articles/APPLY/69954/