I'm a Unix hack, so I've got a script I run whenever I want to run some SQL. I call DB2 with my query and dump stdout to a file. Very neanderthal, but it works. I've got a table with a varchar(28672) in it. The field is never that long, but db2 formats it to 28k wide.
So obviously, I change my query to select substr(field, 1,100) to get just the beginning of the field, and that's what it returns, just the first 100 characters, but it still formats the field that it outputs to 28672 characters. Any idea how to make it format to the size of the data output?