Skip to Content

Archived discussions are read-only. Learn more about SAP Q&A

JDBC SQL Query

Hi Gurus,

I have a question regarding Query and update SQL statement. I have a field in the DB named XXX_date. I need to get the record where the last query ended. Is this possible? For example, my last query was yesterday at 2pm. I want to get the records from today until 2:01pm of yesterday.

Thanks!!!

Former Member
replied

Use functions between and to_date combination to achive this.

Select  XXX, YYY, ZZZ from XXX_table  Where XXX_date between to_date('05-31-2011 12:15','MM-DD-YYYY HH:MI')

 and  to_date('06-01-2011 12:15','MM-DD-YYYY HH:MI')

Hope that helps.

0 View this answer in context

Helpful Answer

by
Not what you were looking for? View more on this topic or Ask a question