Re: NULL-values with Perl/DBD::Informix
Posted in 1999
Tommi Mäkitalo wrote:
> We run Perl and DBD::Informix under SCO OpenServer 5.0.5 and try to
> make bulk-inserts into our database. We decided to prepare a
> insert-statement with:
> $sth = $dbh->prepare(<<'END') or die $!;
> INSERT INTO TABLE(COL1, COL2, COL3)
> VALUES(?, ?, ?)
> END
> $sth->execute($value1, $value2, $value3);>
> How can we insert NULL-values with this statements? Should we use
> some indicators and if so what is the right syntax for these?
A Perl undef value is normally used to indicate NULL. That certainly
applies on output -- it should work with input (insert) too.
--
Jonathan Leffler (jleffler@informix.com, jleffler@earthlink.net)
Guardian of DBD::Informix v0.60 -- see http://www.perl.com/CPAN
#include <disclaimer.h>