Hello All,
Is there anyway I can design this query to execute only one subquery based on the results returned.
select to_char((NEXT_CHANGE# - 1),9999999999999999) latest_change
from v$archived_log
where SEQUENCE# =(select nvl(min(SEQUENCE#),0)
from v$archived_log
where ARCHIVED='YES'
and APPLIED='NO')
If the above subquery returns 0, then I would like to execute the query below. Is there any way to embed multiple queries like case conditions ?
select max(SEQUENCE#)
from v$archived_log
where ARCHIVED='YES'
and APPLIED='YES'
Thanks
G
Edited by: USER101 on Dec 9, 2010 9:34 AM