Skip to Main Content

SQL & PL/SQL

Announcement

For appeals, questions and feedback about Oracle Forums, please email oracle-forums-moderators_us@oracle.com. Technical questions should be asked in the appropriate category. Thank you!

How to retrieve last 2 hours data data from oracle view to Sql server table with out loosing anydata

User_SI5OIJul 8 2022 — edited Jul 8 2022

Hi,
I have a column in Oracle view below
COLUMN_NAME :- UPDATEDDATE
DATA_TYPE:- DATE
I want to fetch last 2 hours data using UPDATEDDATE column in to our table.
Sample value of data UPDATEDDATE ='2022-07-06 18:46:24.0000000'

While receiving data from View in our table we have same column name UPDATEDDATE column with datetime data type.
Please help in fetching data with out loosing any data from View to table
the way i am fetching data like below
where TO_CHAR(UpdatedDate,'YYYY-MM-DD HH:MI:SS') >= TO_CHAR( sysdate - 2/24, 'YYYY-MM-DD HH:MI:SS' ) order by UpdatedDate desc

Comments
Post Details
Added on Jul 8 2022
9 comments
2,358 views