From: "Ron MacNeil" <[EMAIL PROTECTED]>
> It is interesting however that insert #9 below will actually insert a
> NULL value into the table, I had always assumed it would be the empty
> string.

>     let scratch = ""
>     insert into my_table values(scratch); #9

I think I vaguely remember this (about 8 years of Informix,
but Oracle lately). If you have all your insert values in an array,
then you can just do something like this:
for (@insert_values) {
 next unless defined;
 $_ = undef if $_ eq '';
}

$sth->execute(@insert_values);

You could even make an insert_cleanup function or something
that loops over @_ instead of something hard coded.
Hope someone thinks of something better...

HTH,
Douglas Wilson

Reply via email to