1

I'm trying to write a query on a column that's of the time "Timestamp without timezone" and this is my where clause:

and (cv.expire_ts >= 'today' or ifnull(cv.expir_ts, '') = '')

I get the following error:

Error: 'today' is invalid format or value for timestamp without time zone or timestamp with local time zone. Please enter a valid timestamp value in yyyy-mm-dd hh:mm:ss[.fff...] format.
SQLState:  22007
ErrorCode: 4328
Error: Specified cursor is not known to the server.
SQLState:  24000
ErrorCode: 590366

How can I make this query work on this type of column?

4

2 に答える 2

2

Try using the CURRENT_DATE constant, without quotes.

于 2012-04-19T19:06:02.800 に答える
1

I think missing part is date function for 'today'

Refer

于 2012-04-19T16:37:42.280 に答える