February 23, 2008
SQL Server compares strings without regard to case, which is a good thing most of the time, but can sometimes be annoying.
Luckily I found this article on case-sensitive string comparison, which gives a good overview of the possibilities:
- cast the string to VARBINARY(length)
- use COLLATE to specify a case-sensitive collation
- calculate the BINARY_CHECKSUM() of the strings to compare
- change the table column’s COLLATION property
- use computed columns (implicit calculation of VARBINARY)
I chose the COLLATE SQL_Latin1_General_CP1_CS_AS method to perform the queries I needed.
Leave a Comment » |
SQL Server |
Permalink
Posted by devio
February 12, 2008
A friend asked me to have a look at a USB harddisk which cannot be accessed anymore.
I plug it into my PC, try chkdsk g:, and get the message:
Der Typ des Dateisystems ist NTFS.
Version und Status des Datenträgers konnten nicht festgestellt werden. CHKDSK wurde abgebrochen.
Try to google the phrase, or use MSDN if you prefer, and receive… NOTHING.
Now wouldn’t you expect all the funny messages that Windows (or *any* operating system, for that matter) generates, to be searchable on the web? Plus statements by the respective manufacturer about their meaning and possible solutions?
I mean, the time is, uhm, 2008!
Leave a Comment » |
Internet ends here |
Permalink
Posted by devio