Why is "ABCDEF" = "ABC" turning up TRUE in my code?
The single equal sign operator (=) is not what you expect.
If you have SET EXACT OFF (the default) then string comparisons
only check as far as the length of the right-side value.
If you want an exact match, then you should use the double-equals
operator (==) instead. Many programmers forget about it on
purpose and just SET EXACT ON, but there are times (such as
looking up a partial key) when the "fuzzy match" is useful.