ADSM-L

Re: Select Problem

2001-08-27 14:18:08
Subject: Re: Select Problem
From: Alex Paschal <AlexPaschal AT FREIGHTLINER DOT COM>
Date: Mon, 27 Aug 2001 11:19:25 -0700
Well, normally "in" is used like so....

select node_name, filespace_name, other_details from filespaces where
node_name in (select node_name from nodes where domain='TARGETDOMAIN') or
node_name in ('NODE1','NODE2','NODE3')

So, you're saying node_name is "in" (ie, is a member of) a list of objects.
The list can either be explicitely defined, as the node1/node2/node3 list
object, or can be genereated using another select statement, such as the
TARGETDOMAIN select statement.

If you're using 3.7 server or later, you might try something like,

select entity, successful, start_time, end_time, schedule_name from summary
where entity in (select node_name from nodes where domain_name='CRITICAL' or
domain_name='STANDARD')

Or, 3.1, I don't know if this'll work, but it might give you a starting
place,

select events.node_name, events.actual_start, filespaces.backup_end from
events, filespaces where events.node_name=filespaces.node_name and
(events.domain_name='CRITICAL' or events.domain_name='STANDARD')

BUT, since an event can be successful even if the backup died in the middle
of the filespace, I would suggest considering...

select node_name, filespace_name, backup_start, backup_end from filespaces
where backup_end < (current_timestamp - (1 day)) and node_name in (select
node_name from nodes where domain_name in ('CRITICAL','STANDARD'))

Good luck, and I hope this helps.

Alex

<Prev in Thread] Current Thread [Next in Thread>
  • Select Problem, Anderson, Michael - HMIS
    • Re: Select Problem, Alex Paschal <=