Well, are you getting an error message? Turn on your error checking (hint:
RaiseError) and then submit any errors to us. If no errors but the query is
not generating the correct results, you might want to double check your db
for the criteria and maybe run the query through sqlplus.
Ilya
> -----Original Message-----
> From: Vittorio De Martino [mailto:[EMAIL PROTECTED]]On Behalf Of Victor
> Sent: Saturday, August 04, 2001 9:30 AM
> To: dbi-users
> Subject: How to say NULL
>
>
> Leafing through this list and studying Perl and DBI on books I'm now
> able to connect to my Oracle NT server from my linux laptop through
> perl and DBI scripts.
>
> But I have troubles to indicate in an sql query that a value must be
> null. I'm using the following code:
>
>
> my $sql = $dbh->prepare("SELECT cat_term, sum(ptz_eff_netta),
> sum(ptz_eff_lorda)
> FROM PN.GT_ATTR GROUP BY tipo_valore, cat_term
> HAVING (tipo_valore='R' and data_inizio IS NULL) ORDER BY cat_term");
> $sql->execute();
>
> This sql works fine with DB2 but Oracle doesn't like it. What's
> wrong with it?
>
> Ciao
> Vittorio