Results 1 to 7 of 7

Thread: Problems with where clause in sql

  1. #1
    Join Date
    Oct 2009
    Posts
    4

    Problems with where clause in sql

    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?

  2. #2
    Join Date
    Apr 2009
    Posts
    86
    ags10ags, try putting 'tick' marks around the date:

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

  3. #3
    Join Date
    Oct 2009
    Posts
    4
    I did that, then other problem occour 'typemistach error' so I think that sintax is right without ''

  4. #4
    Join Date
    Apr 2009
    Posts
    86
    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')

  5. #5
    Join Date
    Oct 2009
    Posts
    4
    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....

  6. #6
    Join Date
    Apr 2009
    Posts
    86
    You might try here:

    http://www.dbforums.com/

    under OTHER.

  7. #7
    Join Date
    Oct 2009
    Posts
    4
    Quote Originally Posted by SDas View Post
    You might try here:

    http://www.dbforums.com/

    under OTHER.

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

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •