On Thu, Feb 14, 2002 at 11:14:03AM -0500, Bryan Tolka wrote: > Hello everyone . I still cannot insert null values. The rest of the code > below works execpt for the null updates. Anu ideas would be appreciated. > > Bryan > > > if ($ip ne $oldip){ > > $sth = $dbh->prepare("update ipmgt set > > ip = '$oldip', > > hw = 'NULL' ,
You are not inserting a NULL value, you are inserting the four-character string 'NULL'. Try hw = NULL, without the quotes, instead. Also try placeholders for the variables. Here's a shortened example: my $sth = $dbh->prepare(<<"EndOfSQL"); UPDATE ipmgt SET hw = NULL WHERE ip = ? EndOfSQL $sth->execute($oldip); Ronald