Niek,
As Hsieh said, a "string" is always a variable length field whose length is defined by the number of non-blank characters in the field. Therefore, by definition, when a "move" or "assignment" is done to a targer string field, the right most "blanks" are removed from the field. So, in your case, the "string" is empty.
If you are required to use a string (vs CHAR) to interface with the database, then you can use a limited length string. A limited length string has a defined length such as STRING(1) in your example. If you define these as string(1) (or some string(n)), then the string will contain a blank value and test true for blank.
You can create SQL records to use limited length strings by using SQL Retrieve.
Finally, while the writestdout might strip the blanks and the comparisons may say it is "not blank", I would actually think the insert would result in blank data (vs null) in the column up to the defined Maxlen. . Have you confirmed the column in the database is not blank after an insert or update?
Mark
markevans