Carlos and Claire found themselves supporting a 3rd party logistics package, called IniFreight. Like most “enterprise” software, it was expensive, unreliable, and incredibly complicated. It had also been owned by four different companies during the time Carlos had supported it, as its various owners underwent a series of acquisitions. It kept them busy, which is better than being bored.
One day, Claire asked Carlos, “In SQL, what does an exclamation point mean?”
“Like, as a negation? I don’t think most SQL dialects support that.”
“No, like-” and Claire showed him the query.
select * from valuation where origin_country < '!'
“IniFreight, I presume?” Carlos asked.
“Yeah. I assume this means, ‘where origin country isn’t blank?’ But why not just check for NOT NULL?”
The why was easy to answer: origin_country
had a constraint which prohibited nulls. But the input field didn’t do a trim, so the field did allow whitespace only strings. The !
is the first printable, non-whitespace character in ASCII (which is what their database was using, because it was built before “support wide character sets” was a common desire).
Unfortunately, this means that my micronation, which is simply spelled with the ASCII character 0x07
will never show up in their database. You might not think you’re familiar with my country, but trust me- it’ll ring a bell.

Utilize BuildMaster to release your software with confidence, at the pace your business demands. Download today!
Source: Read MoreÂ