On Wed, 24 Oct 2001 11:01:25 +0200, Wolfgang Weisselberg wrote: > insert into bar (foo,baz) values ('NULL', 'inserted string NULL'); > insert into bar (foo,baz) values ( NULL , 'inserted (undefined) NULL'); > > select * from bar where foo = ?
>Try binding > my $bindvar = "NULL"; >and tell me which of the 2 rows will be selected. Tell me >what would happen if DBI transformed the NULL in $bindvar to >"is null". Bull. "NULL" is a string containing 4 characters. If you want NULL, try undef. I really would like my $bindchar = undef; to allow the system to select the second record from your example, and NOT having to generate a whole different statement for the similar but slightly different case where you go searching for NULL's. -- Bart.