Advertisement
If you have a new account but are having problems posting or verifying your account, please email us on hello@boards.ie for help. Thanks :)
Hello all! Please ensure that you are posting a new thread or question in the appropriate forum. The Feedback forum is overwhelmed with questions that are having to be moved elsewhere. If you need help to verify your account contact hello@boards.ie

SQL Question

Options
  • 18-10-2000 2:27pm
    #1
    Registered Users Posts: 2,494 ✭✭✭


    You want something like this

    select P.personal_id
    from personal P
    where UPPER(P.nickname) LIKE '%'+UPPER(@Name) +'%'

    The case sensetivity is a server setting and if you have your db server set to being cases sensitive you have to re-install it.

    Kayos

    The above applies to MS SQL Server (I dont really no about other servers)


Comments

  • Closed Accounts Posts: 20 The_Elf


    I have an sql query something like this

    select P.personal_id
    from personal P
    where P.nickname LIKE '%'+@Name+'%'

    so if @Name = 'lex'
    it returns Alex, Alexander etc etc....

    my question is it possible to make the search case insensitive so that it returns
    names entered as ALEX, AleXaNdEr

    i have no idea how to do this couldn't find anything on the web either


  • Registered Users Posts: 380 ✭✭dogs


    I ran into a similar problem before. Turned
    out that if the value being searched for
    was mixed case, it was a case-sensitive
    search, but if it was all lower-case, it
    was a case-insensitive search. So a quick
    change of case before you query solved it
    for me. Bug / Feature ? I dunno, never
    did read the docs :)


Advertisement