# Database Discussions > IBM DB2 >  Problems with where clause in sql

## ags10ags

Well, 

Hello for everyone,

I'm having problem with where clause in sql for progress database. I cant execute the select usgin where clause (the error is ODBC--call failed). the where clause is:

where [database].date-field>=01/01/2006

Anyone can help, please?

----------


## SDas

ags10ags, try putting 'tick' marks around the date:

WHERE date-colume >= '01/01/2006'

----------


## ags10ags

I did that, then other problem occour 'typemistach error' so I think that sintax is right without ''

----------


## SDas

ags10ags, are your sure date-column is defined in the table as a DATE data type?  Could it be a Timestamp instead?

WHERE date-column = '01/01/2006' is a valid DB2 statement (as long as date-column is actually a DATE.

In some situations you might need to use the DATE function to let DB2 know the character string is a date.  After you have verified date-column is a DATE data type, try:

WHERE date-column = DATE('01/01/2006')

----------


## ags10ags

I underestant, sorry to inform that is not DB2 database but Progress database and yes I am sure that is a date field, I tested te clause where with another field (decimal) and the same problem occur. I could find a forum just for progress database....

----------


## SDas

You might try here:

http://www.dbforums.com/

under OTHER.

----------


## ags10ags

> You might try here:
> 
> http://www.dbforums.com/
> 
> under OTHER.



thanks, i did that, let's see...

----------

