Optimists, Pessimists and Technology People

I got this in the email a while ago and looking at it again, I had to post it because it is too funny.

 

 

Pessimist: “The glass is half empty.”

Optimist: “The glass is half full.”

Database Administrator: “The glass is sized correctly for peak loads.”

Virtualization Admin: “This person should be sharing a Dixie Cup with the guys in accounting.”

Business Intelligence Admin: “How can we upsell this customer to bottled water?”

Security Admin: “Whose glass is this? Half of the water has gone missing.”

Storage Admin: “This glass needs thin provisioning.”

ETL Admin: “We need a faster way to fill this glass.”

Active Directory Admin: “We need a secondary glass for redundancy.”

Backup Admin: “Nobody told me to take a snapshot of the full glass.”

Break Fix Admin: “Hang on, I’ll go get you another glass.”

Linux Admin: “I bet I could build a better glass myself.”

Project Manager: “I need a FTE for 15 minutes to accomplish the deliverable of a full glass.”

Azure Developer: “Why buy your own glass? The clouds are full of water.”

jQuery Developer: “When you start drinking, it automatically refills.”

Mac User: “Check out how much thinner and smaller my glass is, and it holds that much water too.”

Twitter: “The faucet is over capacity. Please wait a moment and try again.”

Using CONVERT with COLLATE to strip accents from Unicode strings

Today Mladen Prajdic  posted a on Twitter a SQL statement that captured my attention: (http://twitter.com/MladenPrajdic/status/9878219727)

SELECT
 CONVERT(varchar(50), N'æøåáäĺćçčéđńőöřůýţžš')
 COLLATE Cyrillic_General_CI_AI
returns aoaaalcccednooruytzs

If you notice the conversion to Cyrillic_General_CI_AI collation his shows an interesting mechanism for code page translation that we could not explain:

Why does Cyrillic_General_CI_AI or   Greek_CI_AI collation successfully convert accents to their base ascii chars?

 I found an answer to this on this KB page: http://support.microsoft.com/kb/153449

What Happens when a Character on One Code Page is Unavailable on Another

 If a conversion occurs and a character on one code page is unavailable on another, the character gets converted to its closest equivalent character on the other code page. For example, ASCII 224 (“alpha”) on code page 437 is converted to 97(“a”) on the ANSI code page. When you convert it back to code page 437, you receive 97(“a”). This is a problem, because you have now lost the original 224(“alpha”). This can potentially cause incorrect data to be saved on your server, as happens in the following two examples:

Example 1:

You have an OEM server in which you are inserting data from an ANSI client, and your AutoAnsiToOem option is enabled. If the character that you are inserting is valid in both code pages, the correct data will be saved. However, if the character is valid in ANSI but not in OEM, the correct data will not be saved.

Example 2:

You insert data into an ANSI server from an OEM client, and the AutoAnsiToOem option is enabled. If the character that you are inserting is valid in both code pages, the correct data will be saved. However, if the character is valid in OEM and not in ANSI, then correct data will not be saved.

 Nevertheless I this is very useful to exotic strip accents from strings (i.e before an export).