Wednesday, May 30, 2012

HURR MS WORD !!

There is an existing looong SQL query which selects some products for a condition where Sub product like ‘%Bill - Option%


Now as a part of an enhancement a request came from a user (via email in Outlook) to add a new Product with Sub Product Bill – Option 
One of my team mates  worked on this and added the new product in a table.. Simple Enough..!!


UAT Started and today the User came back saying that the new product is not being selected.


I was called in for help and after breaking my head for 1 hour determined that the team mate who added the new product, copied the Sub Product name directly from the User’s Email and entered into the table.


Now Microsoft Word on typing a - changes it to a slightly longer version of – .


This is clearly visible here in Outlook but when you look at these two things in SQL. They look exactly the same.


Example: 



(The two above are different; one is a copy from Outlook the other typed). 


One works, the other doesn’t 
Can you guess which is which?


So a Boon for Word/E-mail writers proves to be a curse for a developer!!


Why am I writing this? Coz I am super frustrated after finding the reason for this  error.


Have a Nice  Day !!

THIS IS COSMIC BLASTING OFF !!!!!!!!

3 comments:

Pricious said...

hahaha! one is an 'n' dash, the other is 'm' dash... we are constantly being badgered about its existence. to hell wid it! life is complicated enough to care abt the nuances of dashes!

Pooja Sridhar said...

Hmmm..but ultimately this code proved to be much simpler than SRC..isn't it? :P

Roopa Pavan said...

Nice post....
http://www.deccansojourn.com

Post a Comment

Woww.. You are actually commenting. So sweet of you