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
Hi there,
There is an issue with role permissions that is being worked on at the moment.
If you are having trouble with access or permissions on regional forums please post here to get access: https://www.boards.ie/discussion/2058365403/you-do-not-have-permission-for-that#latest

SQL Question

  • 18-10-2000 1:27pm
    #1
    Registered Users, Registered Users 2 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, Registered Users 2 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