Facing a Problem please help

  • http://www.rickhurst.co.uk/2004/07/29/using-like-in-ms-access-queries/

    pls read this page it has nice article, my problem is similar to as mentioned in this above page.

     

    i have no issue using "%" from asp, but it is not giving the correct results, results which are expected

    for example iam searching for candidates with "c++" skills

    and in the keyword field is "c C++" and in some it is "c,c++"

    the word with comma in it is not shown

    trying to solve this since very long time

    pls help

     

    <a href="http://www.websolsoftware.com"> For IT jobs click here</a>

    *Sukhoi*[font="Arial Narrow"][/font]

  • Does this work?

    Select Whatever from dbo.Table where SearchCol like '%c++%'

  • Also check that the column is not case sensitive.

  • And please don't post multiple threads regarding the same problem

    http://www.sqlservercentral.com/forums/shwmessage.aspx?forumid=338&messageid=367811

    Gail Shaw
    Microsoft Certified Master: SQL Server, MVP, M.Sc (Comp Sci)
    SQL In The Wild: Discussions on DB performance with occasional diversions into recoverability

    We walk in the dark places no others will enter
    We stand on the bridge and no one may pass
  • how can i check whether it is case sensitive or not.

    iam using ms-access 2003

    the problem still continues

    now iam getting the results but they are not what they should be, some mistake

    ==== my query==============

    SELECT candidatesRegistration.CANDIid as CANDIid,candidatesRegistration.firstname as firstname, candidatesRegistration.lastname as lastname, candidatesRegistration.keywords as Skills,candidatesRegistration.lastlogin as lastlogin, candidatesRegistration.education as Edu,candidatesRegistration.university as univ, candidatesRegistration.certification as certification,candidatesRegistration.totalexp as totalexp ,candidatesRegistration.companyname,candidatesRegistration.designation FROM candidatesRegistration where 1=1 and ((candidatesRegistration.certification) like '%ccna%'or (candidatesRegistration.certification) like '%mcse%') and ((candidatesRegistration.countryid)=1) and ((candidatesRegistration.keywords) like '%c%'or (candidatesRegistration.keywords) like '%C++%'or (candidatesRegistration.keywords) like '%java%'or (candidatesRegistration.keywords) like '%linux%') order by lastlogin desc

    =================

    what i expect from this query all the people with either ccna or mcse certified and having skills of either c,c++,java,linux

    means they should be ccna or mcse certified and should also have either of the skills of c,c++,java or linux

    but some results iam getting those guys dont have skills of c,c++,java or linux but they are either mcse and ccna, thats why they are in the result set

    confused

    <a href="http://www.websolsoftware.com"> For IT jobs click here</a>

    *Sukhoi*[font="Arial Narrow"][/font]

  • Check out the parenthesis, looks like you are missing a few, sorry but since I can't test this I really don't have time to search further...

  • prenthesis are correct, still it gives strange results sometimes,

    time will solve it automatically i guess,

    till then lets see

    <a href="http://www.websolsoftware.com"> For IT jobs click here</a>

    *Sukhoi*[font="Arial Narrow"][/font]

  • I've never seen that actually happen, however I've heard of such cases where ghosts were comming in fater us to do our work.

     

    Your next step is to check out the data.  Run the select with one group of conditions at the time untill you find out the missing link.

  • Your wild cards are a little too wild. Keywords LIKE '%c%' will match any of the following. 'Access','Visual Basic','C#', 'Javascript','Cobol',etc

    That may be the cause of your 'ghosts'

    Gail Shaw
    Microsoft Certified Master: SQL Server, MVP, M.Sc (Comp Sci)
    SQL In The Wild: Discussions on DB performance with occasional diversions into recoverability

    We walk in the dark places no others will enter
    We stand on the bridge and no one may pass
  • you may be right, i will have to give more time to it, see it test it again and again,

    then i might be able to solve it

    <a href="http://www.websolsoftware.com"> For IT jobs click here</a>

    *Sukhoi*[font="Arial Narrow"][/font]

  • It might be an idea to normalise the table so that you can do equalities, rather than having to use like across a comma delimited list.

    Gail Shaw
    Microsoft Certified Master: SQL Server, MVP, M.Sc (Comp Sci)
    SQL In The Wild: Discussions on DB performance with occasional diversions into recoverability

    We walk in the dark places no others will enter
    We stand on the bridge and no one may pass

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

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