Different results in Contains and Like

  • Hi

    I am using MSSQL Server 2005 with the Full Text Search.

    Query with Contains and like not give the same results

    My Query is

    Select * from Searchtable where (ipccode like '%A61K 36/00%' or ipccode like '%A61P 17/00%') and (ipccode like '%C13K 13/00%' and ipccode like '%A61P 1/00%')

    Its gives the 78 results and

    Select * from Searchtable Where ( Contains( IPCCode ,'("A61K 36/00" or "A61P 17/00") and ("C13K 13/00" and "A61P 1/00")') )

    Its gives the 355 results

    both are same query first with Like and second with Contains, why results come with differents.

    Any help to find out the problem

    Thanks and Regards

    Manohar

  • Can you just scan the results of the queries by eye to determine which is behaving unexpectedly?

    Once you know which query is returning the wrong results, it will be easier to understand what is going on.


Viewing 2 posts - 1 through 2 (of 2 total)

You must be logged in to reply to this topic. Login to reply