Please start any new threads on our new
site at https://forums.sqlteam.com. We've got lots of great SQL Server
experts to answer whatever question you can come up with.
| Author |
Topic |
|
tmcheah
Starting Member
2 Posts |
Posted - 2004-09-24 : 22:45:52
|
| Dear Derrick, I had encountered the problem as below. When I want to save the 2 records with code 'BA' and 'Ba'. It is no problem. But when I want to delete only code 'Ba'. It delete the both records. How can I prevent this problem. How to set the case sensitive. Will much appreciate if you can give me the answer.From Angie Ng |
|
|
kselvia
Aged Yak Warrior
526 Posts |
Posted - 2004-09-24 : 23:34:30
|
| This will force case sensitive comparision.delete from MyTable where MyCol COLLATE Latin1_General_BIN = 'Ba'--KenI want to die in my sleep like my grandfather, not screaming in terror like his passengers. |
 |
|
|
nr
SQLTeam MVY
12543 Posts |
Posted - 2004-09-25 : 15:31:24
|
| You can also use convert(varbinary(), ...) on both sides.==========================================Cursors are useful if you don't know sql.DTS can be used in a similar way.Beer is not cold and it isn't fizzy. |
 |
|
|
derrickleggett
Pointy Haired Yak DBA
4184 Posts |
Posted - 2004-09-25 : 20:05:21
|
| Either way is going to cause a recompile. If you want to always treat this one column as case-sensitive, you should alter the column to use a case sensitive collation so you aren't getting recompiles all the time. Look at the COLLATE clause.MeanOldDBAderrickleggett@hotmail.comWhen life gives you a lemon, fire the DBA. |
 |
|
|
|
|
|