Quote Originally Posted by hafeezkalsekar
... its not possible to get sysdate after every alter index rebuild comannd.
I really hate when some of my guys comes with a "its not possible"... look
Code:
select  "CMDLINE"
from
(
select  index_name                                                              "SORT1",
        '1'                                                                     "SORT2",
        'alter index '||owner||'.'||index_name||' rebuild online;'              "CMDLINE" 
from    dba_indexes
where   owner = 'FCCUAT21'
union
select  index_name                                                              "SORT1",
        '2'                                                                     "SORT2",
        'select to_char(sysdate,'||'''dd-Mon-yyyy hh24:mi:ss'''||') from dual;' "CMDLINE"
from    dba_indexes
where   owner = 'FCCUAT21'
)
order by "SORT1", "SORT2"
/