Actually needs the text "NULL". "undef" doesn't work. Apologies-- I hope somebody else needs this information someday. -Chris -----Original Message----- From: McMahon, Chris Sent: Wednesday, May 05, 2004 2:23 PM To: [EMAIL PROTECTED] Subject: Another simple DBI question: INSERT a NULL (MSODBC)?
Hello again... I'm getting the hang of this, but now: $sql = qq{INSERT INTO table VALUES ($port,333,,,0); $sth = $dbh->prepare($sql) or die "Could not prepare $sql\n"; $sth->execute() or die "Could not execute $sql\n"; ...fails with "Incorrect syntax near ','" error, but $sql = qq{INSERT INTO table VALUES ($port,333,9,9,0); ...succeeds. How does one insert a NULL/UNDEF value into a table? -Chris -- To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] <http://learn.perl.org/> <http://learn.perl.org/first-response>