"The best argument against democracy is a five minute conversation with the average voter."
-- Winston Churchill

SQL Fail

(The entire text can be read here.)

So a coder was dealing with a stored procedure that returned the following error: “Conversion failed when converting datetime from character string.”

To try to figure out the problem, he retrieved the dates in the database to pin down the problem:
2/23/2006
03/21/2006
08/23/2006
1O/18/2OO5
1O/18/2OO5
1O/18/2OO5
02/26/2007
02/26/2007

Still baffled, he looked to forums for help:

“In just looking at the returns in the grid in Management Studio, when I run
the select statement that returned the 8 date values, it appears the
1O/18/2OO5 values are of a different font size. This can probably even be
seen as you compare the zero’s from the following paste:
08/23/2006
1O/18/2OO5

Any ideas on validation, or handling this situation?”

And he probably felt a little foolish after being told the strange “zeroes” were actually capital O’s.

July 15th, 2009 8 comments
Posted by Donnie Filed under Computer-fu, Patently Ineffective