in reply to adding blank to varchar2 NOT NULL field in DBD::Oracle

This doesn't answer your question at all, but please consider the effect of your actions on the poor souls who might have to deal with this data in the future. If the field is NOT NULL, it's probably because the database designer felt it very important to have a useful value in that field. Perhaps it would be worthwhile to investigate the reason, and either get the field changed or put the right data in there.

For the sake of future users of this database, think about using some obviously bogus value like 'This field intentionally left blank', or at the very least some visible character like a dash or an x or something. Keep in mind that while your code can easily tell the difference between a null value and a space, to users of many GUI interfaces, they'll look exactly the same.

  • Comment on Re: adding blank to varchar2 NOT NULL field in DBD::Oracle

Replies are listed 'Best First'.
Re: Re: adding blank to varchar2 NOT NULL field in DBD::Oracle
by wardk (Deacon) on Jul 16, 2001 at 18:15 UTC
    I upvoted this reply. Rather than attempt to defeat the purpose of the column constraint, perhaps anonymous monk should speak the the table owner and find out why this constraint exists. If the constraint is not needed, then remove the constraint instead of hacking it with bogus data.