code_junkie

How do I perform a case-sensitive search and replace in SQL 2000/2005?

Nov 11th, 2011
116
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 0.42 KB | None | 0 0
  1. SELECT testColumn FROM testTable
  2. WHERE testColumn COLLATE Latin1_General_CS_AS = 'example'
  3.  
  4. SELECT testColumn FROM testTable
  5. WHERE testColumn COLLATE Latin1_General_CS_AS = 'EXAMPLE'
  6.  
  7. SELECT testColumn FROM testTable
  8. WHERE testColumn COLLATE Latin1_General_CS_AS = 'eXaMpLe'
  9.  
  10. SELECT testColumn FROM testTable
  11. WHERE testColumn COLLATE Latin1_General_CS_AS = 'eXaMpLe'
  12. and testColumn = 'eXaMpLe'
Add Comment
Please, Sign In to add comment