View Single Post

   
  #2 (permalink)  
Old 03-17-2008, 06:12 AM
Lennart
 
Posts: n/a
Default Re: Syntax Error-Help!!

On Mar 14, 5:42 pm, Ty <tyrone_...@yahoo.com> wrote:
> Syntax Error-Help!!
>
> My error "SQL0180N The syntax of the string representation of a
> datetime value is incorrect. SQLSTATE=22007" .
>
> I'm using yyyy-mm-dd. I can see the dates in a column on another
> query as 2007-06-17 23:00:13.827584 which is yyyy-mm-dd time(i
> guess).
>
> My attempt:
> SELECT <column_list>
> FROM ABXDB01.mdall_rec_holdg
> WHERE ABX_REQ_BUCKT = 'OK'
> AND CMPL_Q_DT > '2008-03-01';
>


I assume CMPL_Q_DT is a timestamp. Try:

[...]
AND date(CMPL_Q_DT) > '2008-03-01';

/Lennart
Reply With Quote