If this is your first visit, be sure to check out the FAQ by clicking the link above.
You may have to register before you can post: click the register link above to proceed.
To start viewing messages, select the forum that you want to visit from the selection below.
What does "Does not work" mean?
Get error?
Get incorrect result?
What is the data type of column B?
timestamp?
This may(or may not) produce your required result.
select * from A where B >= current timestamp - 1 HOUR - MINUTE(current timestamp)MINUTES - SECOND(current timestamp)SECONDS - MICROSECOND(current timestamp)MICROSECONDS
Your problem is that CURRENT DATE returns a date (year, month, day) - not a timestamp (date + time). So you should use CURRENT TIMESTAMP as Tonkuma suggested.
__________________
Knut Stolze
IBM DB2 Analytics Accelerator
IBM Germany Research & Development