ADSM-L

Re: Hail the power of SQL!

2000-08-09 15:56:45
Subject: Re: Hail the power of SQL!
From: "Williams, Tim" <Tim.Williams AT FRITOLAY DOT COM>
Date: Wed, 9 Aug 2000 14:56:45 -0500
Richard, Wow on your doc web site....I like yours:
SELECT, example using dates             'SELECT * FROM actlog WHERE
date_time \>
                                         '1999-12-22 00:00:00.000000' AND
                                         date_time \< '1999-12-23
                                         00:00:00.000000'  '
Here's another good  example of a date range working back a couple of
days....:
select * from actlog where (severity='W' or severity='E' or severity='D')
and days (current_timestamp)-days(date_time)<2
*
Yet another one that I use when people don't use the 'backup' system within
90 days...so I can identify them to either call them
or delete them from the system....:
set sqldisplaymode wide
adsm> select node_name, contact, lastacc_time, reg_time, domain_name from
nodes
where domain_name='FL_INTL' and
days(current_timestamp)-days(lastacc_time)>90 or
der by lastacc_time desc > d:\personal\adsmreports\intlcleanup

FYI Thanks Tim
<Prev in Thread] Current Thread [Next in Thread>