Results 1 to 3 of 3
  1. #1
    Join Date
    Jun 2007
    Posts
    197

    Smile Unanswered: case insensitivity

    here is simple query

    SELECT * FROM BFTITLE WHERE RFNAME='HITLER';

    but if i want to select hitler LOWER leave case this query is not valid so how can we right query to select all type of hitler(case type)

  2. #2
    Join Date
    Nov 2004
    Location
    on the wrong server
    Posts
    8,835
    Provided Answers: 6
    sql server is by default case insensitive. if someone has changed the default collation, you can use the UPPER and LOWER functions.
    “If one brings so much courage to this world the world has to kill them or break them, so of course it kills them. The world breaks every one and afterward many are strong at the broken places. But those that will not break it kills. It kills the very good and the very gentle and the very brave impartially. If you are none of these you can be sure it will kill you too but there will be no special hurry.” Earnest Hemingway, A Farewell To Arms.

  3. #3
    Join Date
    May 2007
    Location
    somewhere in dbforums
    Posts
    221
    well what you can do is change your where clause by changing the search type to either upper or lower.....something like

    SELECT * FROM BFTITLE WHERE upper(RFNAME)=upper('HITLER');
    OR
    SELECT * FROM BFTITLE WHERE lower(RFNAME)=lower('HITLER');

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •