http://qs321.pair.com?node_id=189813


in reply to Substituting '--' for Nulls

Not knowing DB2 myself, I may be wrong, but couldn't you do something like the following (untested) SQL statement to make the database to the substitution for you?

SELECT if(field,field,'--') as field FROM table;

MySQL also has an IFNULL expression, but again, I don't know enough about DB2 to know if it has one too.

- $0.02 from the rat

__________
He seemed like such a nice guy to his neighbors / Kept to himself and never bothered them with favors
- Jefferson Airplane, "Assassin"