This
will show you tables aged > 60 days:
db2 "select tabname from
syscat.tables where days(current timestamp) - days(create_time) > 60 and
tabschema not like 'SYS%'"
This
will help you proof it:
db2 "select tabname from
syscat.tables where date(create_time) < '2002-01-01' "
-----Original Message-----
From: Johnson, Shaunn [mailto:[EMAIL PROTECTED]
Sent: Tuesday, February 25, 2003 1:33 PM
To: [EMAIL PROTECTED]
Subject: [DB2EUG] get a tables creation dateHowdy:
Is there a way to get a tables age from within the
database?What I mean is, I know that I have created a list of temporary
tables, but I may not know what they are. I would like to
create a script that drops those tables by a date parameter
(if the age of t_table is > 60 days; drop t_table) rather than
dropping the tables by name association (t_table).Suggestions? Comments?
Thanks!
-X
