Hi Folks,
I'm trying to get a count from a table where the values in a [DATE] column are more recent than a specified lapsed time. Here is the code so far which doesn't appear to work given the Sysdate and the values in the table.
----
select count(*) as StatusResult from table1
where to_char(date1, 'DD.MM.YYYY:HH24:MI:SS') >
(select to_char(sysdate - .5, 'DD.MM.YYYY:HH24:MI:SS')from dual)
----
In this case 6 hours but I'll need to adjust. Any help would be appreciated.
Cheers
Al
I'm trying to get a count from a table where the values in a [DATE] column are more recent than a specified lapsed time. Here is the code so far which doesn't appear to work given the Sysdate and the values in the table.
----
select count(*) as StatusResult from table1
where to_char(date1, 'DD.MM.YYYY:HH24:MI:SS') >
(select to_char(sysdate - .5, 'DD.MM.YYYY:HH24:MI:SS')from dual)
----
In this case 6 hours but I'll need to adjust. Any help would be appreciated.
Cheers
Al