Gossamer Forum
Home : Products : DBMan SQL : Development, Plugins and Globals :

cannot set columns to NULL in GT::SQL::Table->update

Quote Reply
cannot set columns to NULL in GT::SQL::Table->update
Hi,

Does anyone have an idea why the following code does not set the column slip_id to NULL for all records where slip_id is equal to 7?
Code:

my $trans = $DB->table( "transactions" );
$trans->update( {'slip_id'=>undef}, GT::SQL::Condition->new('slip_id', '=', 7 ) );
Note that the following code does work:
Code:
my $trans = $DB->table( "transactions" );
$trans->update( {'slip_id'=>0}, GT::SQL::Condition->new('slip_id', '=', 7 ) );

Thanks, Jasper

http://www.bookings.org
Subject Author Views Date
Thread cannot set columns to NULL in GT::SQL::Table->update jaspercram 4092 Nov 12, 2002, 8:33 AM
Thread Re: [jaspercram] cannot set columns to NULL in GT::SQL::Table->update
yogi 3981 Nov 13, 2002, 12:41 PM
Post Re: [yogi] cannot set columns to NULL in GT::SQL::Table->update
jaspercram 3914 Dec 3, 2002, 7:46 AM