on 2016 Mar 20 4:15 PM
Is it possible to drop a view after a certain date or if it older than 4 weeks etc.?
Request clarification before answering.
Just out of curiosity: What is the particular reason your view will need to be dropped (and re-created?) after some time?
Note, the "age" of an object can be found in system table SYS.SYSOBJECT in field "creation_time", such as
select table_name, creation_time from SYS.SYSTAB ST key join SYS.SYSOBJECT SO where table_name = 'MyYoundView';
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
Well, we can't tell whether you would like to
outside that certain time. Both are possible, the former for example with the ALTER VIEW ... DISABLE clause, the latter with the help of a condition that returns false/unknown outside the desired interval, say, by filtering based on the current time or by checking the existence of a particular connection variable or by a flag in another table...
User | Count |
---|---|
33 | |
21 | |
16 | |
8 | |
7 | |
6 | |
5 | |
4 | |
4 | |
4 |
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.