ADSM-L

Re: incompatible operator

2005-07-05 11:40:49
Subject: Re: incompatible operator
From: Andrew Raibeck <storman AT US.IBM DOT COM>
To: ADSM-L AT VM.MARIST DOT EDU
Date: Tue, 5 Jul 2005 08:40:23 -0700
I think the problem is that you are mixing "date" data with "timestamp"
data (the latter includes date and time). Try changing this:

... and date(pending_date) < (current_timestamp - 1 day) and ...

to this:

... and date(pending_date) < (date(current_timestamp) - 1 day) and ...

Regards,

Andy

Andy Raibeck
IBM Software Group
Tivoli Storage Manager Client Development
Internal Notes e-mail: Andrew Raibeck/Tucson/IBM@IBMUS
Internet e-mail: storman AT us.ibm DOT com

The only dumb question is the one that goes unasked.
The command line is your friend.
"Good enough" is the enemy of excellence.

"ADSM: Dist Stor Manager" <ADSM-L AT VM.MARIST DOT EDU> wrote on 2005-07-05
08:09:43:

> Hello Everyone!
>
> I think I had this issue before, but I can't seem to find the solution
to
> it.  Any suggestions as to why this will not work?  I am trying to get
that
> listing pinpointed to reporting each tape on the first day that it
becomes
> "pending" and it just doesn't see to like my syntax.  Thanks!
>
> ANR2916E The SQL data types DATE and TIMESTAMP are incompatible for
> operator '<'.
>
>                                         |
>          ...............................V...............................
>          ENDING' and date(pending_date) < (current_timestamp - 1 day) an
>
> select volume_name,date(pending_date) from volumes where
> stgpool_name='TAPE_NDMP_OFFSITE' and devclass_name='NASDEV' and
> status='PENDING' and date(pending_date) < (current_timestamp - 1 day)
and
> volume_name like 'N%' order by volume_name
> ********************************
> Joni Moyer
> Highmark
> Storage Systems
> Work:(717)302-6603
> Fax:(717)302-5974
> joni.moyer AT highmark DOT com
> ********************************

<Prev in Thread] Current Thread [Next in Thread>