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.
I am trying to set up a job in sql server that will run an asp file...the file connects to an oracle database and runs a query on all rows in a table with a date that falls between the current system date and the time the job was last run (2 hours)
what would the syntax be for "where row_date >= sysdate - 2hours"?
Location: The extremely Royal borough of Kensington, London
Posts: 778
select * from table
where to_char(rowDATE, 'DD-MON-YY:HH24') >= SYSDATE||':'||(to_char(SYSDATE, 'HH24')-2);
__________________
Bessie Braddock: Winston, you are drunk!
Churchill: And Madam, you are ugly. And tomorrow, I'll be sober, and you will still be ugly.