Case sensitive problem

  • Hi, I need to compare a two string in case sensitive mode but even I use a proper collation but the result is incorrect. Which collation will help me?

    select PATINDEX('%[a-z]%', 'A12123z' collate SQL_Latin1_General_CP1_CS_AS)

    --> Correct!

    select PATINDEX('%[A-Z]%', 'sdfasCdfsfA' collate Latin1_General_CS_AS )

    --> Incorrect! the result is 1 but correct one is 6

  • U can use Binary collation.... SQL_Latin1_General_Cp850_BIN

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

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