Results 1 to 4 of 4

Thread: Case sensitivity while compareing

  1. #1
    Junior Member
    Join Date
    Apr 2009
    Answers
    2

    Case sensitivity while compareing

    Hello everyone

    I am taking username and password from user checking it against db now while checking, it is not case sensitive ..
    For example
    user enters
    user Name : abc
    password : a

    now the query is "select usrid from userMaster where unm='abc' and password='a' "
    this query is giving me output whenever user enters 'abc' as well as 'Abc' for both

    i.e. it is not case sensitive what should I do for this


  2. #2
    Moderator
    Join Date
    Jun 2007
    Answers
    2,074

    Re: Case sensitivity while compareing

    if you are talking of oracle user name and password , that is not case sensitive.


  3. #3
    Junior Member
    Join Date
    Apr 2009
    Answers
    2

    Re: Case sensitivity while compareing

    Quote Originally Posted by debasisdas View Post
    if you are talking of oracle user name and password , that is not case sensitive.
    No its SQLServer


  4. #4
    Contributing Member
    Join Date
    Jun 2007
    Answers
    65

    Re: Case sensitivity while compareing

    There are many ways to do that

    To use the case sensitive query in Sql u have to use its collation property along with query in format.

    Collate SQL_Latin1_General_CP1_CS_AS

    SELECT * FROM CaseSensitiveTest
    WHERE Value1 LIKE '%Test%' Collate SQL_Latin1_General_CP1_CS_AS



    Hope this would help u.


    ---V V---
    Vikas Vaidya

    Last edited by debasisdas; 04-16-2009 at 03:36 AM. Reason: link removed.

  5.  Sponsored Ads
    Ad


     

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •  
About us
Applying for a job can be a stressful and frustrating experience, especially for someone who has never done it before. Considering that you are competing for the position with a at least a dozen other applicants, it is imperative that you thoroughly prepare for the job interview, in order to stand a good chance of getting hired. That's where GeekInterview can help.
Interact