binding a variable to NULL in perl-DBD

Max Pyziur <[email protected]> Wed, 21 Aug 2013 17:06:26 -0400 (EDT)
Newsgroups gmane.comp.db.postgresql.interfaces
Message-ID <[email protected]>
Greetings,

I'm trying to determine how to pass "NULL" to a variable, specifically in 
the conditional section of a SQL statement:

SELECT moo
FROM foo aa
WHERE field1 = ?
AND field2 = ?

Sometimes at the command line, when running the perl-DBD script, I would 
like the select statement to reflect:

SELECT moo
FROM foo aa
WHERE field1 = 'goo'
AND field2 IS NULL

Much thanks in advance,

Max Pyziur
[email protected]



-- 
Sent via pgsql-interfaces mailing list ([email protected])
To make changes to your subscription:
http://www.postgresql.org/mailpref/pgsql-interfaces