Your problem might be with the database handle (your $dbhandle), not
sysdate.
It might be undefined. Make sure your connection to the database is
successful.

marco

> -----Original Message-----
> From: jmb [mailto:[EMAIL PROTECTED]]
> Sent: Tuesday, April 17, 2001 9:12 AM
> To: [EMAIL PROTECTED]
> Subject: newbie question to sysdate
>
>
> Hi,
> I am new to this list and am looking for some help. I have tried
> finding my
> problem with perldoc DBI and the FAQ, but without luck... 8(
>
> I am trying to execute the following statement:
> $query = $dbhandle->prepare("select FAXID from GMX.FAX_DIR where
> PROCESSLEVEL=2 and (sysdate - LASTCHANGE)<$T_MAX_OPEN ");
>
> The error I get is:
>    Can't call method "prepare" on an undefined value at
> ./myprog.pl line 144.
>
> However executing the same thing with sqlplus is no problem:
> SQL> select FAXID from GMX.FAX_DIR where PROCESSLEVEL=2 and (sysdate -
> LASTCHANGE) > 12;
>
> no rows selected
> SQL>
>
> Also I checked $T_MAX_OPEN and it contains a value...
>
> Thanks,
> Joachim
>

Reply via email to