View Single Post

   
  #6 (permalink)  
Old 03-17-2008, 07:12 AM
Mark A
 
Posts: n/a
Default Re: Syntax Error-Help!!

"Ian" <ianbjor@mobileaudio.com> wrote in message
news:7hzCj.69147$497.45133@newsfe14.phx...
> DB2 interprets '2008-03-01' as a date, and CMPL_Q_DT is
> (presumably) a timestamp. So, use either:
>
> CMPL_Q_DT > '2008-03-01-00.00.00.000000'
>
> or
>
> DATE(CMPL_Q_DT) > '2008-03-01'
>
>
> The latter form will preclude the use of any index on the
> CMPL_Q_DT column, so you're better off specifying the full
> timestamp.


Actually, the two above choices are not equivalent (I made the same error in
my post). These would be the same:

CMPL_Q_DT >= '2008-03-02-00.00.00.000000'
DATE(CMPL_Q_DT) > '2008-03-01'

But I am not sure of the intent of the OP.



Reply With Quote