I'm confused by the results of a string comparison. I only discovered this because it's causing an issue with some legacy code we are migrating for a client from the mainframe.
I thought any non-blank value would be greater than a space, but the minus sign is not. In the debugger, I added the following watch expressions:
"a" > " " (this is true)
"-" > " " (this is false)
Is this a bug or expected behavior? It's causing an issue when running the client's converted code because a loop is exiting when it shouldn't based on that comparison. I don't know why someone would have a single dash as a key value, but that's what's in the data. That might be an EBCDIC to ASCII conversion issue which we're also investigating. Regardless, I would expect a char(45) to be greater than a char(32).